ASP.NET MVC routing issue with Google Chrome client

前端 未结 3 602
死守一世寂寞
死守一世寂寞 2021-01-16 01:21

My Silverlight 4 app is hosted in ASP.NET MVC 2 web application. It works fine when I browse with Internet Explorer 8. However Google Chrome (version 5) cannot find ASP.NET

3条回答
  •  时光取名叫无心
    2021-01-16 01:46

    What I discovered is that two methods of WebRequest: Create and CreateHttp behave differently when using HTTPS. Always use Create method to instantiate the right request according to a protocol. I had similar situation and that what I've got. For the following code we have Not Found exception when trying to get some content using WebRequest:

    HttpWebRequest request = WebRequest.CreateHttp(uri); 
    

    But the following piece works well:

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
    

提交回复
热议问题