简体   繁体   English

另一个站点内的IIS站点,不同的web.config

[英]IIS Site inside another site, different web.config

I have an MVC web app on my iis with windows authentication. 我的iis上具有Windows身份验证的MVC Web应用程序。 I have a folder called Content which holds all of my images. 我有一个名为Content的文件夹,其中包含我的所有图像。

I want that the Content folder will be freely excessed so I converted the Content folder to an application. 我希望Content文件夹可以随意覆盖,因此我将Content文件夹转换为应用程序。 The problem is that my main web.config is being read and it looks for WebGrease in Content/bin which it obviously cant find. 问题是正在读取我的主要web.config,它在显然找不到的Content / bin中查找WebGrease。

Is there a way to make the Content web app use a different web.config? 有没有一种方法可以使Content Web App使用不同的web.config?

I succeeded by wrapping some of my web config sections in my parent's web.config with the location tag 我通过使用位置标记将我的一些Web配置部分包装在父母的web.config中而成功

https://msdn.microsoft.com/en-us/library/b6x6shw7(v=vs.100).aspx https://msdn.microsoft.com/zh-CN/library/b6x6shw7(v=vs.100).aspx

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

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