获得"默认文档没有配置"在IIS 7.5部署ASP.NET MVC应用程序时的错误 [英] Getting "A default document is not configured " error when deploying ASP.NET MVC application on IIS 7.5

查看:241
本文介绍了获得"默认文档没有配置"在IIS 7.5部署ASP.NET MVC应用程序时的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发一个ASp.NET MVC 5应用程序。运行时不开发计算机上的一个问题(Windows 7的86)。当我试图将其部署到IIS 7.5(赢Server 2008 R2的64位),我得到了3个错误:


  1. 无法识别的属性'targetFramework。请注意,属性名称是区分大小写的。

我通过删除修复了这个问题targetFramework =4.5从

 <编译调试=真targetFramework =4.5>

<醇开始=2>

  • 标记中包含了文化属性的值无效。

  • 我不知道为什么,但标准是关于以下项:

     &LT;全球化enableClientBasedCulture =真正的文化=AZ-LATN的UICulture =AZ-LATN/&GT;

    取出培养后=AZ-LATN的UICulture =AZ-LATN这个问题也得到了解决。但我不认为这是解决了一个适当的方式,所以它会是很好的了解正确的解决方案。

    <醇开始=3>
  • 现在,第三个错误是的我拍摄了一整天的人。现在解决了上述两个问题后,我得到的错误图像中:

  • 这似乎对于大多数人工作的最佳解决方案是增加以下条目:

     &LT;模块runAllManagedModulesForAllRequests =真/&GT;

    不过,我已经拥有它的配置文件。 IIS不见了URLRewrite模块,所以我手动安装。(不知道是不是这虽然有什么关系呢)。没有帮助。启用32位应用程序。没有帮助。还有什么我应该尝试一下呢?


    解决方案

    有两种可能的解决方案。


    1. 确认正在运行你的网站的应用程序池设置为第4版很可能默认为V2,这将给你在你的问题中提到的所有错误。


    2. 重新注册使用此命令你的框架:



      

    C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 \\ aspnet_regiis的-i


    我也想还原您所做的这些更改(例如把 targetFramework 属性回)

    Developing an ASp.NET MVC 5 application. Runs without an issue on the development machine (Windows 7 x86). When I tried to deploy it on IIS 7.5 (Win Server 2008 R2 64 bit) I got 3 errors:

    1. Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

    I fixed this issue by removing targetFramework="4.5" from

    <compilation debug="true" targetFramework="4.5">
    

    1. The tag contains an invalid value for the 'culture' attribute.

    I don't know why but compliant was about the following entry:

    <globalization enableClientBasedCulture="true" culture="az-Latn" uiCulture="az-Latn" />
    

    After removing culture="az-Latn" uiCulture="az-Latn" this problem also got solved. But I don't think this is a proper way of solving that, so it'd be good to know the right solution.

    1. Now the third error is the one that's taken all my day. After solving the above two problems now I get the error in the image:

    The best solution that seems to work for almost everybody is to add the following entry:

        <modules runAllManagedModulesForAllRequests="true" />
    

    But I already have it in the config file. IIS was missing URLRewrite module so I installed it manually.(Don't know if this has anything to do with it though). Didn't help. Enabled 32 bit Applications. Didn't help. What else should I try?

    解决方案

    There are two possible solutions

    1. Make sure the application pool that is running your site is set to version 4. It's likely defaulted to v2 which will give you all the errors you mentioned in the question.

    2. Re-register your framework with this command:

    C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i

    I'd also revert those changes you have made (e.g. put the targetFramework attribute back in)

    这篇关于获得&QUOT;默认文档没有配置&QUOT;在IIS 7.5部署ASP.NET MVC应用程序时的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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