IIS 7.5设置MVC以在localhost上运行 [英] IIS 7.5 setting up MVC to run on localhost

查看:55
本文介绍了IIS 7.5设置MVC以在localhost上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让MVC在我的本地主机上运行,​​但仍然会遇到大量错误。有人可以帮我设置它。现在我收到了这个错误。



错误摘要
HTTP错误403.14 - 禁止
Web服务器配置为不列出此目录的内容。





我曾尝试启用[目录浏览]但仍未将任何请求路由到登录表单。



请帮忙。





@Christian Graus这只是我的本地副本而且我是试图做我能做的一切只是为了让它运行它不会!!!!! IIS在应用程序之前安装,一切都运行在它的网站项目,普通的html网站,我可以通过网站项目连接到数据库等除了FRIGGIN MVC不工作。我不知道还有什么可以尝试它只是不运行。



我在弄乱UrlRoutingModule-4.0似乎加载了项目,但屏幕是空白的。我知道该项目有效,因为我得到了与其他人相同的源代码,并且在他们的机器上它只通过IIS运行我的本地配置,这是我遇到的麻烦。



我确实运行aspnet_regiis -i仍然是一样的。没有变化。

解决方案

你永远不应该期望浏览MVC应用程序的内容。您是在ASP.NET之前还是之后安装IIS?尝试运行 aspnet_regiis [ ^ ]



好​​的 - 如果我得到一票就不确定我是否想要更多的帮助,因为我提出了一些非常明显的东西,但是,你为什么要在IIS中运行呢?在Visual Studio中使用F5有什么问题?您使用的是没有它的Express Edition吗?


几天前我遇到了同样的问题,解决方案与Christian Graus说的相同。

您也可以尝试将web.config修改为以下代码:

 <   system.webserver  >  
< modules runallmanagedmodulesforallrequests = true / >
<! - < validation validateIntegratedModeConfiguration =false/> - > < / system.webserver >



删除< validation>< / validation> 标记,并将其替换为< modules>< / modules> 中的一个< system.webserver>。< /system.webserver>

希望它也适合您。


尝试通过右键单击解决方案为您的应用程序添加可部署的依赖项,这将解决您的问题。


I am trying to get MVC to run on my local host but keep getting tons of errors. Can someone help me set it up. Right now I am getting this error.

Error Summary
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.



I did tried to enable [Directory Browsing] but that will still not route any requests to login form.

Please help.


@Christian Graus this is only my local copy and I am trying to do everything I can just to make it run it just wont't!!!!! IIS was installed before the application and everything runs in it Website project, plain html websites, I can connect to db through website project etc EXCEPT THE FRIGGIN MVC DOES NOT WORK. I am not sure what else to try it just does not run.

I was messing with UrlRoutingModule-4.0 that seems to load the project but the screen is blank. I know the project works because I got the same source code that other people have and on their machine it runs through IIS only my local config that is what I am having trouble with.

I did run aspnet_regiis -i still the same. No changes.

解决方案

You should never expect to browse the contents of an MVC application. Did you install IIS before or after ASP.NET ? Try running aspnet_regiis[^]

OK - not sure if I want to help more if I get a one vote because I suggested something that was pretty obvious, but, why do you want to run in IIS at all ? What's wrong with hitting F5 in Visual Studio ? Are you using an Express Edition that doesn't have it ?


I faced the same problem a few days ago and the solution is the same as Christian Graus said.
You could also try modifying your web.config to the following code:

<system.webserver>
    <modules runallmanagedmodulesforallrequests="true" />
    <!--<validation validateIntegratedModeConfiguration="false" />--></system.webserver>


Remove the <validation></validation> tag and replace it with the <modules></modules> one in <system.webserver>.</system.webserver>
Hope it works for you as well.


Try to add Deploy able dependencies for your application by right clicking to your solution in vs. May this will solve your problem.


这篇关于IIS 7.5设置MVC以在localhost上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆