The problem stems from a missing request for the .ASPXAUTH cookie.
Does anyone know how to resolve or resolve this issue?
< /p>
System.Net.WebRequest.RegisterPrefix(“http://”, WebRequestCreator.BrowserHttp);
System.Net.WebRequest.RegisterPrefix(“https://”, WebRequestCreator.BrowserHttp );
Then create the HttpWebRequest object.
// Create request
HttpWebRequest request = HttpWebRequest.CreateHttp(” http://zainshaikh.posterous.com/”);
Hope this helps.
Now I have one from mvc The silverlight application where the website fetches data. As long as I use WebClient and GET requests, everything seems to be ok. However, when I use HttpWebRequest and POST, I have problems with authentication.
Problems The request stems from a missing .ASPXAUTH cookie.
Does anyone know how to solve or solve this problem?
Write the following code before making the HttpWebRequest object.
System.Net .WebRequest.RegisterPrefix(“http://”, WebRequestCreator.BrowserHttp);
System.Net.WebRequest.RegisterPrefix(“https://”, WebRequestCreator.BrowserHttp);
Then create the HttpWebRequest object.
// Create request
HttpWebRequest request = HttpWebRequest.CreateHttp(“http://zainshaikh.posterous.com/”) ;
Hope this helps.