无法创建在Visual Studio 2013的新Web项目 [英] Unable to create a new web project in Visual Studio 2013

查看:6015
本文介绍了无法创建在Visual Studio 2013的新Web项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:



我想用我的办公用机,在这里我有一些有限的权利,从家里。所有的产品都当我用我的网络硬盘,那里有我的个人资料存在通过连接安装。



现在,我在家里,我没有这些网络驱动器的访问。



< STRONG>问题:



每当我试图创建在Visual Studio中的一个项目,我收到以下错误:

  --------------------------- 
微软的Visual Studio
---------------------------
套餐'ProviderPackage加载失败。
---------------------------

查找:



在做一些研究,我发现,这是由于IISExpress后。我已确保从工具>选项> Web项目IIS Express的所有新的Web项目未启用



我也得到了一个错误:

  --------------------------- 
微软的Visual Studio
---------------------------
配置IIS快递失败,出现以下错误:

文件名:redirection.config

错误:无法读取配置文件

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

然后我意识到可能是它不能够实例与IIS。然后我试图运行在命令提示符下的IIS Express和我得到这个错误:




C:\Program Files\IIS快递> iisexpress.exe



同时读取配置信息时出错。确保
的配置文件
\NAUNSW001\MalhAm\IISExpress\config\applicationhost.config EXI STS,
是访问,并包含有效的配置信息。




我没有到该路径可能是由IISexpress拾取注册表的访问。



我试图执行IISexpress /路径:C:\vs\它的工作。
然而,即使这样还当我试图创建一个新的项目,我得到了一个错误:

   - ------------------------- 
微软的Visual Studio
-------------- -------------
配置IIS快递失败,出现以下错误:

文件名:redirection.config

错误:无法读取配置文件

请指教


解决方案

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



如果您发现该错误来那么很可能是跟IISExpress或IIS配置,您可能无法从家里到控制的事情。



这是我找到的解决方法是:




  1. 创建项目

  2. 系统将无法连接到该项目,但它已创建。然后浏览到该项目已被创建的目录,并在记事本或任何编辑器打开项目文件

  3. 确保该< UseIISExpress>假< / UseIISExpress>

  4. 之前在项目文件进一步修改,创建你的IIS和指向项目路径的虚拟目录。

  5. 找到< WebProjectProperties>在项目文件中的配置

  6. 定义IISUrl下的虚拟目录路径

  7. <。 / OL>

    您的配置文件应该是这个样子:

     < WebProjectProperties> ; 
    < UseIIS>真< / UseIIS>
    < AutoAssignPort>真< / AutoAssignPort>
    将; DevelopmentServerPort大于0&下; / DevelopmentServerPort>
    < DevelopmentServerVPath> /< / DevelopmentServerVPath>
    < IISUrl>的http://本地主机/ YourAppAlias /< / IISUrl>
    < NTLMAuthentication>假LT; / NTLMAuthentication>
    < UseCustomServer>假LT; / UseCustomServer>
    < CustomServerUrl>
    < / CustomServerUrl>
    < SaveServerSettingsInUserFile>假LT; / SaveServerSettingsInUserFile>
    < / WebProjectProperties>


    Background:

    I am trying to use my office machine, where I have some limited rights, from home. All products are installed through when I was connected with my network drives, where my profile exists.

    Now, I am at home where I don't have an access to these network drives.

    Problem:

    Whenever I am trying to create a project in visual studio I am getting the following errors:

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

    Finding:

    After doing some research I found that it is due to IISExpress. I have ensured that from Tools > options > Web project that IIS express is not enabled for all new web project.

    I also got an error as:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Configuring IIS Express failed with the following error:
    
    Filename: redirection.config
    
    Error: Cannot read configuration file
    
    ---------------------------
    

    Then I realized that may be it is not able to instantiate with IIS. Then I have tried to run an IIS express from the command prompt and I got this error:

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

    An error occurred while reading configuration information. Make sure that the configuration file \NAUNSW001\MalhAm\IISExpress\config\applicationhost.config exi sts, it is accessible, and contains valid configuration information.

    I don't have an access to the registry where this path might be picked by the IISexpress.

    I have tried to execute the IISexpress /path: c:\vs\ it worked. However, even then also when I am trying to create a new project I got an error as:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Configuring IIS Express failed with the following error:
    
    Filename: redirection.config
    
    Error: Cannot read configuration file
    

    Please advice

    解决方案

    Alright - I am able to find the workaround.

    If you find this error coming then probably it is to do with the IISExpress or IIS configuration that you may not be able to control from home.

    The workaround that I have found is that:

    1. Create Project,
    2. System will not be able to attach the project, however it has been created. Then browse to that directory where the project has been created, and open the project file in the notepad or any editor.
    3. Make sure that <UseIISExpress>false</UseIISExpress>
    4. Before modifying further in the project file, Create a virtual directory in your IIS and point to the project path.
    5. find <WebProjectProperties> in your project file config.
    6. Define the virtual directory path under IISUrl.

    Your config file should look something like this:

    <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>
    

    这篇关于无法创建在Visual Studio 2013的新Web项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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