I developed a web application (code behind C#) for calling a web service.
The first call is for the autentication on the web service by login and password. I do this call with:
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(getloginUrl())
getLoginUrl() simply return the web service url (https://xxx.yyyy.com/zzzz/Integration command=login)
Until I worked on my machine...no problem; the web service calls work perfectly. As soon as I put my web application on my hosting provider and I test the application by IE I got this error:
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, 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.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) at System.Net.HttpRequestCreator.Create(Uri Uri) at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) at System.Net.WebRequest.Create(String requestUriString) at Ses.WebService.Handler.Communication.Login(String userName, String password) in d:\inetpub\webs\paolinotestdotnet1arubait\App_Code\Communication.cs:line 31 at _Default.cmdLogin_Click(Object sender, EventArgs e) in d:\inetpub\webs\paolinotestdotnet1arubait\Default.aspx.cs:line 43 The action that failed was: Demand The type of the first permission that failed was: System.Net.WebPermission The Zone of the assembly that failed was: MyComputer
I think that's a permission problem....but I really don't know how I have to do to solve that!!!
Please, someone could help me !!
Thanks
.NET Development6
|