Found an answer to it. silverlight needs to register a url scheme so that it can handle incoming httpstatus codes.
bool httpResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp); bool httpsResult = WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
I am sure this is not the only use of RegisterPrefix. I would like others to help me understand what their potential use is.
EDIT:
silverlight offers to work in two modes using http stack. one is the default browser. all cookies and the auth header are processed by the browser, but it does not send a status code in exchange for the Silverlight client.
The ClientHttp table, on the other hand, offers you to receive status codes and other information about the exception, but it requires that you manage everything yourself, including cookies, headers, etc.
Sincerely.
source share