Hosted Windows control in htm and that in turn tries to connect to the same server via web service - Exception thrown

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I hosted an Windows control into a html and hosted in a server. When i try to access it. I can very well see the control.

The problem comes when that windows control tries to connect to its server to pull some data using web service.


The exception thrown is:
System.Security.SecurityException: Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

It worked in two scenarios
1. In the windows control, if the web service server is stated as http://localhost/Sample.asmx IT WORKS but if it is like http://xxx.xx.xxx.xx/Sample.asmx then IT IS NOT WORKING.

2. In the client system, For the Intranet Zone, changed the Persission set to Full trust IT WORKS but i want to give full trust only to that specific URL. If i give full trust to that specific URL, IT IS NOT WORKING.

My Windows control which is hosted in the htm is a very simple assembly without any strong name. But it is comming from the same server. Since if i give full trust to that URl it has to work right ? What is that i am missing...

--------------------------------
From: Senthil Kumar

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>LZ6nJNZHQECKh9KMn0vtTQ==</Id>
.



Relevant Pages