Silverlight httpwebrequest cannot be included in Header .aspxauth cookie

Now I have a silverlight application that fetches data from the mvc website. As long as I use WebClient and GET requests, everything seems to be fine. However, when I use HttpWebRequest and POST, I Encountered an authentication problem.

The problem stems from a missing request for the .ASPXAUTH cookie.

Does anyone know how to resolve or resolve this issue?

Write the following code before making the HttpWebRequest object.

< /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.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4016 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.