背景:
我试图在家中使用我的办公室机器,但我在其中拥有一些有限的权利。当我连接到配置文件所在的网络驱动器时,所有产品均已安装完毕。
现在,我在家里,无法访问这些网络驱动器。
问题:
每当我尝试在Visual Studio中创建项目时,都会出现以下错误:
---------------------------
Microsoft Visual Studio
---------------------------
Package 'ProviderPackage' failed to load.
---------------------------
发现:
经过一些研究,我发现这是由于IISExpress引起的。我确保从工具>选项> IIS Express的Web项目未为所有新的Web项目启用。
我也有一个错误,因为:
---------------------------
Microsoft Visual Studio
---------------------------
Configuring IIS Express failed with the following error:
Filename: redirection.config
Error: Cannot read configuration file
---------------------------
然后我意识到可能无法用IIS实例化。然后,我尝试从命令提示符下运行IIS Express,但出现此错误:
C:\ Program Files \ IIS Express> iisexpress.exe
读取配置信息时发生错误。确保配置文件\ NAUNSW001 \ MalhAm \ IISExpress \ config \ applicationhost.config文件可以访问并且包含有效的配置信息。
我没有访问注册表的权限,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配置有关。
我发现的解决方法是:
您的配置文件应如下所示:
<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>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句