IIS无法找到web.config [英] IIS not able to locate the web.config

查看:268
本文介绍了IIS无法找到web.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS中部署了一个Web应用程序.过去一直没有任何问题.最近,我已经将该Web应用程序转移到另一台机器上,这就是问题所在.当我在IIS中打开默认文档时设置了Web应用程序后,出现如下所示的找不到文件"错误

I have a deployed a web application in IIS. Which used to work without any issues. Recently i have shifted that web application to another machine, Here is the problem. Once i setup the Webapplication when i opened the default document in IIS im getting the File not found error as following

内部服务器错误

\?\ C:\ inetpub \ wwwroot \ application \ web.config

\?\C:\inetpub\wwwroot\application\web.config

我不知道为什么IIS无法找到web.config.该文件位于路径C:\ inetpub \ wwwroot \ application \ web.config中,但IIS在路径\?\ C:...中.

I have no clue why the IIS is not able to find the web.config. The file is present in the path C:\inetpub\wwwroot\application\web.config but the IIS is looking in the path \?\C:....

请让我知道如何解决这个问题?

Please let me know how to resolve this??

推荐答案

首先,这记录在 support.microsoft .com ,所以我建议有此问题的任何人首先阅读此书,因为它涵盖了许多我不会的解决方案

Firstly this is documented on support.microsoft.com so I would suggest that anyone who has this issue read this first as it covers a number of solutions which I won't

现在,根据我的经验,我在设置新的开发计算机后遇到了此错误.我忘了要做的是安装Url Rewrite 2.0 IIS模块.可悲的是,IIS错误绝对不知道这是实际问题.

Now from personal experience I encountered this error after setting up a new development machine. What I had forgotten to do was install the Url Rewrite 2.0 IIS module. Sadly the IIS error gives absolutely no idea that this is the actually issue.

因此,要解决此问题,请调查我们的web.config中的system.webServer设置,并确保已安装所有使用的iis模块.我是通过系统地从web.config中删除元素来做到这一点的,直到遇到原因为止.

Therefore to solve this issue investigate the system.webServer setting in our web.config and ensure that you have installed all the iis modules that you use. I did this by systematically removing elements from my web.config until I came across the cause.

这篇关于IIS无法找到web.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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