Web应用程序项目[...]被配置为使用IIS。 Web服务器[...]找不到。 [英] The Web Application Project [...] is configured to use IIS. The Web server [...] could not be found.

查看:1380
本文介绍了Web应用程序项目[...]被配置为使用IIS。 Web服务器[...]找不到。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的解决方案文件的Web项目,该项目是不可用当我打开的解决方案。当我在网络上右击项目并重新加载项目,我收到以下错误:

I have a web project in my solution file that is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error:


Web应用程序项目mycompany.myapp.mywebproject配置为使用IIS。 Web服务器的http://本地主机/ MyWebApp找不到。

我没有手动设置虚拟目录此Web应用程序。

I have not manually set up virtual directories for this web application.

每同事,Visual Studio中应提示我创建虚拟目录,但我没有得到提示。

Per colleagues, Visual Studio should prompt me to create virtual directories but I am not getting prompted.

我在我的开发机器上安装IIS之前安装VS2010。

I installed VS2010 before installing IIS on my dev machine.

下面是我的机器设置:


  • Windows 7企业版

  • 的Service Pack 1

  • 64位操作系统

  • Visual Studio 2010的企业服务包1

  • IIS 7.5版

推荐答案

在这种情况下最简单的解决方法是手动进行虚拟目录。

When this happens the easiest solution is to make the virtual directory manually.

首先,你需要确保你有ASP.Net的正确版本安装并已安装了IIS扩展名。

First of all, you need to make sure you have the right version of ASP.Net installed and that you have installed the IIS extensions.

要做到这一点,到相关的.NET版本的文件夹C:\\(视窗)\\ microsoft.net \\(dotnetver)\\
 (替代PC上的文件夹,右边括号内的文件夹),并运行此命令

To do this, go to the relevant .net version's folder in c:\(windows)\microsoft.net\(dotnetver)\ (substituting the bracketed folders for the right folders on your PC) and run this command

aspnet_regiis.exe -i

接下来一旦这样运行,并完成后,有时运行

Next once that's run and finished, sometimes running

iisreset

在命令行中的帮助,有时你并不需要。

from the command line helps, sometimes you don't need to.

接下来,进入你的IIS管理器,找到本地主机的网站,然后选择添加文件夹。
浏览到包含实际的ASP.Net工程项目中的文件夹,并补充说。

Next, go to your IIS Manager and find you localhost website and choose add a folder. Browse to the folder in your project that contains the actual ASP.Net project and add that.

最后,右键单击您添加的文件夹,你应该有一个写着转换为应用程序或创建虚拟目录或类似的选项。

Finally, right click on the folder you added and you should have an option that says 'convert to application' or 'create virtual directory' or something similar.

!!确保虚拟目录的名称为MyWebApp'!!

刷新您的解决方案,它应该工作。

Reload your solution and it should work.

请警惕;这不是一个编程的问题(应该不是真的被张贴在这里),但我已经张贴了这个指导意见,因为它是一个共同的问题,但我已经张贴的建议是通用的;我列出的命令是正确的,但你需要在IIS中做可能会有所不同的步骤,它取决于你的版本,您的帐户权限。

Please be wary; this isn't a programming question (and shouldn't really be posted here) but I've posted this guidance as it's a common problem, but the advice I've posted is generic; the commands I've listed are correct but the steps you need to do in IIS may vary, it depends on your version and your account privileges.

祝你好运!

这篇关于Web应用程序项目[...]被配置为使用IIS。 Web服务器[...]找不到。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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