简体   繁体   English

在IIS 7.5上本地运行(部署?)ASP.NET MVC

[英]Run (deploy?) ASP.NET MVC on IIS 7.5 locally

I am a Web Designer, not a programmer, specially not an ASP.NET MVC programmer. 我是Web设计人员,不是程序员,尤其是不是ASP.NET MVC程序员。

At my work there are no programmers anymore. 在我的工作中,不再有程序员。 The application was developed by a contracted programmer and the contract has finished. 该应用程序是由合约的程序员开发的,合约已完成。 I am the person that will reuse his work for this year (it is about a festival that happens every year). 我就是今年将重用他的作品的人(这大约是每年发生的一个节日)。 My job is to change the CSS with the objective of keeping the functionality and changing the appereance. 我的工作是更改CSS,以保持功能并更改外观。

Following best practices, I want to "develop" locally on my computer (Windows 7 Ultimate SP1, IIS 7.5 and Visual Studio Professional 2013) and, after the job is approved, put the application online again. 遵循最佳实践,我想在计算机(Windows 7 Ultimate SP1,IIS 7.5和Visual Studio Professional 2013)上本地“开发”,并在批准工作后将应用程序重新置于联机状态。

I tried to follow those steps in these questions (and answers): 我试图在这些问题(和答案)中遵循这些步骤:

How to run ASP.NET C# web application locally? 如何在本地运行ASP.NET C#Web应用程序?

ASP.NET MVC on IIS 7.5 IIS 7.5上的ASP.NET MVC

ASP MVC in IIS 7 results in: HTTP Error 403.14 - Forbidden IIS 7中的ASP MVC导致:HTTP错误403.14-禁止

I tried this tutorial too, following another answer in another question: 我也在另一个问题的另一个答案之后尝试了本教程:

ASP.NET MVC 4 and IIS7: How to Configure/Run ASP.NET MVC4 web application in IIS 7 ASP.NET MVC 4和IIS7:如何在IIS 7中配置/运行ASP.NET MVC4 Web应用程序

But I could not get the thing to work. 但是我无法使事情正常进行。 I do not know how to configure IIS to past the various error messages. 我不知道如何配置IIS以过去各种错误消息。 Some of them are: 他们之中有一些是:

403 forbidden 403禁止

Configuration Error 配置错误

Line 24:     <httpRuntime targetFramework="4.5" />
Line 25:     <compilation debug="true" targetFramework="4.5" />
Line 26:     <authentication mode="Forms">
Line 27:       <forms loginUrl="~/Account/Login" timeout="2880" />
Line 28:     </authentication>

In one of the searched answers, Mark Boltuc says to put this on the Web.config file: 在搜索到的答案之一中,Mark Boltuc说将其放在Web.config文件中:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer>

It did not work either. 它也不起作用。

The application is in a server running Windows Server 2008 and the database is in another server (HOSTGATOR) and is using MySQL. 该应用程序位于运行Windows Server 2008的服务器中,而数据库位于另一台服务器(HOSTGATOR)中,并且正在使用MySQL。

Could someone, please show me the steps to solve this? 有人可以告诉我解决此问题的步骤吗?

Thank you, very much. 非常感谢你。

Edit: 编辑:

I cannot put an image... 我不能放图片...

Well, on IIS Manager, I created another site, outside the Default and stop it. 好吧,在IIS管理器上,我在Default之外创建了另一个站点并停止它。 My site is running on IIS. 我的网站正在IIS上运行。

In the Application Pools I created an application with the same name. 在应用程序池中,我创建了一个具有相同名称的应用程序。 It is started, the .NET framework version is now v2.0 but I already tried to put it as v4.0 and it did not work. 它已经启动,.NET框架版本现在是v2.0,但是我已经尝试将其设置为v4.0,但它不起作用。 The manage Pipeline is Integrated. 管理管道已集成。

Maybe you missing the handler since you using the form authentification 可能因为使用表单身份验证而错过了处理程序

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"></modules>
    <handlers>
      <remove name="UrlRoutingHandler"/>
    </handlers>
 </system.webServer>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM