繁体   English   中英

无法在Visual Studio 2013中创建新的Web项目

[英]Unable to create a new web project in Visual Studio 2013

背景:

我想在家里使用我的办公室机器,我有一些有限的权利。 当我连接到我的网络驱动器时,所有产品都会安装,我的配置文件存在。

现在,我在家里,我无法访问这些网络驱动器。

问题:

每当我尝试在visual studio中创建项目时,我都会遇到以下错误:

---------------------------
Microsoft Visual Studio
---------------------------
Package 'ProviderPackage' failed to load.
---------------------------

发现:

经过一些研究后,我发现它归功于IISExpress。 我确保从工具>选项> Web项目中,没有为所有新的Web项目启用IIS express。

我也有一个错误:

---------------------------
Microsoft Visual Studio
---------------------------
Configuring IIS Express failed with the following error:

Filename: redirection.config

Error: Cannot read configuration file

---------------------------

然后我意识到可能是它无法用IIS实例化。 然后我试图从命令提示符运行IIS表达式,我收到此错误:

C:\\ Program Files \\ IIS Express> iisexpress.exe

读取配置信息时发生错误。 确保配置文件\\ NAUNSW001 \\ MalhAm \\ IISExpress \\ config \\ applicationhost.config exi sts,可访问,并包含有效的配置信息。

我没有访问IISExpress可能选择此路径的注册表。

我试图执行IISexpress / path:c:\\ vs \\它工作。 然而,即便如此,当我尝试创建一个新项目时,我得到一个错误:

---------------------------
Microsoft Visual Studio
---------------------------
Configuring IIS Express failed with the following error:

Filename: redirection.config

Error: Cannot read configuration file

请指教

好吧 - 我能找到解决方法。

如果您发现此错误,则可能是您可能无法在家中控制的IISExpress或IIS配置。

我找到的解决方法是:

  1. 创建项目,
  2. 系统将无法附加项目,但已创建。 然后浏览到创建项目的目录,并在记事本或任何编辑器中打开项目文件。
  3. 确保<UseIISExpress> false </ UseIISExpress>
  4. 在项目文件中进一步修改之前,在IIS中创建一个虚拟目录并指向项目路径。
  5. 在项目文件配置中找到<WebProjectProperties>。
  6. 在IISUrl下定义虚拟目录路径。

您的配置文件应如下所示:

<WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>0</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost/YourAppAlias/</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>

请使用以下路径:

转到MyComputer> Documents> IISExpress> config> applicationhost.config

右键单击applicationhost.config并转到“属性”选项。 现在单击高级按钮并取消选中加密包含安全数据。

希望这能解决你的问题...... !!! :)

我有类似的问题甚至无法在2013年开始一个网络项目。没有一个解决方案建议工作

所以我尝试了以下内容

获得以下文件夹的读写权限

C:\\ Program Files(x86)\\ IIS Express \\ config(默认安装iisexpress8)确保子文件夹架构和模板都具有读写访问权限

然后进入模式文件夹并重命名为asp net_schema.xml并从命令提示符运行iisexpress.exe。

它开始iis express并成功注册网站“webisite1”应用程序的URL“xxxx”

之后我退出iisexpress并再次将模式文件重命名为旧名称。

之后我开始一个Web项目没有问题

我以一种奇怪的方式发现了它! 在我的情况下查找IIS配置文件。 C:\\ Users \\\\ OneDrive \\ Documents \\ IISExpress但不小心我的One Drive暂停了。 所以它能够访问下面的文件夹中的文件。 C:\\ Users \\\\ OneDrive \\ Documents \\ IISExpress \\ config所以只需确保IIS可以访问配置文件。

暂无
暂无

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

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