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

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.