I have setup an application in Medium Trust Environment(.Net Trust Levels = Medium) and I am trying to load Favicon using Tilde(~) symbol in href but it throws an error.
<link rel="shortcut icon" href="~/Content/img/favicon.ico"/>
If I remove the ~ sign then the error goes off.
I am getting error as below :
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Any Suggestions?
Thanks