Monday, July 29, 2013

Request for the permission of type 'System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

Hi ghouse_silver,


Based on your description. I understand that you want to find user’s IP address using code, but the program throws an exception.


My suggestion is as the followings:



  1. Implement a custom CAS policy for your web application.

  2. Require strongly naming for the DLL.


Here is a similar case for you to take a look:


http://social.technet.microsoft.com/Forums/sharepoint/en-US/c4779b22-6d7a-43a9-913a-97d2c0d97493/sharepoint-security-configurations


Using custom CAS policy files in SharePoint 2010:


http://www.insidesharepoint.net/post/2011/09/04/Using-custom-CAS-policy-files-in-SharePoint-2010.aspx


Please inform me freely if you have any questions.

Thanks,




Qiao Wei

TechNet Community Support



No comments:

Post a Comment