简体   繁体   English

asp.net mvc 4作为Web应用程序而不是网站

[英]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.

相关问题 重定向到另一个网站在 ASP.NET Core Web 应用程序中不起作用 - Redirect to another website is not working in ASP.NET Core Web Application 类库参考在Asp.net 5 MVC 6 Web应用程序中不起作用 - Class library reference is not working in Asp.net 5 mvc 6 web application 将ASP.NET Web应用程序转换为ASP.NET WebSite - Convert ASP.NET Web Application to ASP.NET WebSite 可扩展的ASP.NET MVC Web应用程序 - Extensible ASP.NET MVC Web Application ML.Net 情感分析预测评论在 ASP.NET MVC web 应用程序中不起作用 - ML.Net sentimental analysis prediction of comments not working in ASP.NET MVC web application 如果网站创建为 Visual C# ASP.Net Web 应用程序在 VS2015 中,PageMethods 不起作用 - PageMethods not working if the website is created as a Visual C# ASP.Net Web Application in VS2015 ASP.Net MVC网站和Web API作为单一实施 - ASP.Net MVC Website & Web API As Single Implementation ASP.Net Web应用程序VS ASP.net MVC Web应用程序 - ASP.Net web application VS ASP.net MVC web application asp.net MVC 4 Web应用程序“ /”应用程序中的服务器错误? - asp.net MVC 4 web application Server Error in '/' Application? Office 365与Asp.net Web应用程序(MVC应用程序)集成吗? - Office 365 integration with Asp.net web application (MVC Application)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM