System.Security.SecurityException - System.Net.DnsPermission  
Author Message

PostPosted: .NET Framework Networking and Communication, System.Security.SecurityException - System.Net.DnsPermission Top

I have  a .net user control which purpose is a chat client and I am getting the error:

System.Security.SecurityException: Request for the permission of type 'System.Net.Dn****ission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
  At System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean i****Set)
  At System.Security.CodeAcces****ission.Demand()
  At System.Net.Dns.GetHostAddress(String hostNameOrAddress)
  At System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
  At C43.Net.C43Client.Connect()
The action that failed was:
The type of the first permission that failed was:
The Zone of the assembly that failed was:

When I host the application in a windows form, it works with no problems, it is only when it is hosted in a web page that I am getting the error. Does anyone know a way around this

.NET Development36