简体   繁体   English

Windows Azure和web.config设置

[英]Windows Azure and web.config settings

I'm new to Windows Azure and just created my first "Web Site". 我是Windows Azure的新手,并且刚刚创建了我的第一个“网站”。 Very easy and running well. 非常简单,运行良好。 1 question though... 不过有1个问题...

Does Azure ignore and/or override some or all settings that I have configured in my web.config file? Azure是否忽略和/或替代我在web.config文件中配置的某些或所有设置?

As a simple example, I have the following in my web.config: 作为一个简单的示例,我的web.config中包含以下内容:

<system.webServer>
    <defaultDocument enabled="true">
        <files>
            <clear />
            <add value="index.html" />
        </files>
    </defaultDocument>
</system.webServer>

But I still see many possible default documents listed on the Configure tab for my site. 但是,我仍然在网站的“配置”选项卡上看到许多可能的默认文档。

It got me wondering what other settings it is ignoring. 我想知道它还忽略了其他哪些设置。

Thanks. 谢谢。

If you have a <clear/> line, I would not expect any of the default docs that you see in the Azure portal to actually be effective. 如果您有<clear/>行,我希望您在Azure门户中看到的任何默认文档都不会真正生效。 What the Azure portal shows is what ends up going in ApplicationHost.config, which your web.config overrides. Azure门户显示的是最终在ApplicationHost.config中进行的内容,您的web.config将覆盖该内容。

Are you saying that you still see the Azure portal values being effective at runtime? 您是说仍然看到Azure门户值在运行时有效吗? That would be puzzling. 那会令人困惑。

IIS in Windows lists several common default documents when you manage a site(home.html, index.php, etc). Windows中的IIS在管理站点时列出了几个常见的默认文档(home.html,index.php等)。 What you have listed in your web.config is not the list of possible default documents, it is the exact default document for your application. 您在web.config中列出的内容不是可能的默认文档列表,而是您的应用程序的确切默认文档。 Azure is showing you common default documents in the configuration manager and will override your web.config if you choose something different. Azure在配置管理器中向您显示常见的默认文档,如果您选择其他选项,它将覆盖您的web.config。

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

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