开发者

Asp.net 4.0 webform routing is not working with Window Azure

I've developed a web application which uses ASP.net 4.0 Routing. I开发者_如何学Got's working fine without using Window Azure.

But when I use it with Window Azure, it's not working, giving me 404 not found error. Means routing is not working.

I've follows the link: http://www.michaelckennedy.net/blog/2009/05/27/ASPNETRoutingInWindowsAzureUsingWebForms.aspx and try to implement accordingly. It is working fine with framework 3.5

But the same thing I applied with framework 4.0 is not working.


By default the web role for asp.net web forms is created with an operating system image based on Windows Server 2008 but for MVC applications which support routing the web role image is based on Windows Server 2008 R2.

So by manually switching OS family from 1 to 2 in the service configuration file on my web role it is published on R2 instead and that solved the problem with routing for me (for web api beta on .net 4.0). I guess that it contains some IIS configurations that allows routing that is not present in the default web forms role image.

I found the solution in this blog post (in german) http://blog.jan-welker.de/2011/12/18/WindowsAzureASPNETWebforms40UndSystemWebRouting404Vorprogrammiert.aspx and with some help of google translate I managed to solve the problem I had.


I was having this problem and it was driving me crazy.

The solution is to enable "HTTP Redirection":

Windows Features -> Internet Information Services -> Word Wide Web services -> Common HTTP Features

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜