ASP.NET MVC运行IIS7部署问题

时间:2021-01-20 03:39:24

I am having trouble deploying an ASP.NET MVC app to IIS7.

我无法将ASP.NET MVC应用程序部署到IIS7。

I have an MVC project created with ASP.NET MVC Beta 1. It consists of nothing more than the default template unmodified.

我有一个用ASP.NET MVC Beta 1创建的MVC项目。它只包含未经修改的默认模板。

The app runs just fine within VS2008, but when I publish it to a local IIS7 website (http://localhost), I get the following server error:

该应用程序在VS2008中运行良好,但当我将其发布到本地IIS7网站(http:// localhost)时,我收到以下服务器错误:

The incoming request does not match any route

传入的请求与任何路由都不匹配

I have also tried unsuccessfully to access http://localhost/Home/About (a route to a specific page within the template). This returns a 404 error.

我还尝试访问http:// localhost / Home / About(到模板中特定页面的路由)失败。这会返回404错误。

I have recreated the website in IIS several times and ensured the pipeline mode is set to integrated. My IIS7 server is running on my Vista Home Premium machine.

我已经多次在IIS中重新创建了网站,并确保将管道模式设置为集成。我的IIS7服务器在我的Vista Home Premium计算机上运行。

I am assuming this is an IIS configuration issue any suggestions as to configuration issues with ASP.NET MVC apps would be appreciated.

我假设这是一个IIS配置问题任何有关ASP.NET MVC应用程序的配置问题的建议将不胜感激。

Any thoughts?

5 个解决方案

#1


3  

http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

This solved all my problems.

这解决了我所有的问题。

#2


2  

Does IIS run ok with the default IIS7 site?

IIS是否可以使用默认的IIS7站点运行?

Are you receiving any Event Viewer messages?

您是否收到任何事件查看器消息?

#3


2  

Is IIS in Integrated Mode? If it's not, you'll have to do some setup or change it to Integration Mode

IIS是否处于集成模式?如果不是,您将不得不进行一些设置或将其更改为集成模式

#4


1  

Please make sure that you are running under IIS 7.0 Integrated mode. If you need to run it under IIS 7.0 Classic mode, you need to perform several actions to make the routes work. Please refer the following blog posts;

请确保您在IIS 7.0集成模式下运行。如果需要在IIS 7.0 Classic模式下运行它,则需要执行多个操作才能使路由正常工作。请参考以下博客文章;

http://www.tugberkugurlu.com/archive/running-asp-net-mvc-under-iis-6-0-and-iis-7-0-classic-mode---solution-to-routing-problem

http://www.tugberkugurlu.com/archive/deployment-of-asp-net-mvc-3-rc-2-application-on-a-shared-hosting-environment-without-begging-the-hosting-company

#5


1  

You need to install these software requirements:

您需要安装这些软件要求:

  • AspNetMVC3ToolsUpdateSetup
  • wpilauncher_3_10(Select: Application Request Routing 2.5)
  • wpilauncher_3_10(选择:应用程序请求路由2.5)

#1


3  

http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

This solved all my problems.

这解决了我所有的问题。

#2


2  

Does IIS run ok with the default IIS7 site?

IIS是否可以使用默认的IIS7站点运行?

Are you receiving any Event Viewer messages?

您是否收到任何事件查看器消息?

#3


2  

Is IIS in Integrated Mode? If it's not, you'll have to do some setup or change it to Integration Mode

IIS是否处于集成模式?如果不是,您将不得不进行一些设置或将其更改为集成模式

#4


1  

Please make sure that you are running under IIS 7.0 Integrated mode. If you need to run it under IIS 7.0 Classic mode, you need to perform several actions to make the routes work. Please refer the following blog posts;

请确保您在IIS 7.0集成模式下运行。如果需要在IIS 7.0 Classic模式下运行它,则需要执行多个操作才能使路由正常工作。请参考以下博客文章;

http://www.tugberkugurlu.com/archive/running-asp-net-mvc-under-iis-6-0-and-iis-7-0-classic-mode---solution-to-routing-problem

http://www.tugberkugurlu.com/archive/deployment-of-asp-net-mvc-3-rc-2-application-on-a-shared-hosting-environment-without-begging-the-hosting-company

#5


1  

You need to install these software requirements:

您需要安装这些软件要求:

  • AspNetMVC3ToolsUpdateSetup
  • wpilauncher_3_10(Select: Application Request Routing 2.5)
  • wpilauncher_3_10(选择:应用程序请求路由2.5)