[英]asp.net mvc 4 working as web application not as a website
I have a simple asp.net mvc 4 web application, there is no code problem or any issues with routing. 我有一个简单的asp.net mvc 4 Web应用程序,没有代码问题或路由问题。
I deploy it to IIS(any version) as a web application it works fine i can browse my site fine. 我将它作为Web应用程序部署到IIS(任何版本)中,都可以正常工作,我可以很好地浏览我的网站。 If i just deploy it to web site, it throws standard 404 not found exception. 如果我只是将其部署到网站,则会引发未找到标准404的异常。
I am trying to understand why this happens with asp.net mvc web applications? 我试图了解为什么ASP.NET MVC Web应用程序会发生这种情况?
Any clues? 有什么线索吗? Any experience deploying this as a web site? 有任何将其部署为网站的经验吗?
Web Applications are compiled, Web Sites are as-is, meaning your C# files are served without actually being compiled in to a .dll Web应用程序已编译,Web站点保持原样,这意味着无需实际将C#文件编译为.dll就可以提供它。
This is why it isn't working, MVC sites must be compiled in to a .dll 这就是为什么它不起作用的原因,必须将MVC站点编译为.dll。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.