<PackageReference Include="System.Security.Permissions" Version="10.0.5" />

System.Security.Permissions.UrlIdentityPermissionAttribute

Allows security actions for UrlIdentityPermission to be applied to code using declarative security. This class cannot be inherited.
public string Url { get; set; }

Gets or sets the full URL of the calling code.

Initializes a new instance of the UrlIdentityPermissionAttribute class with the specified SecurityAction.