Unable to create a new web project in Visual Studio 2013
Asked Answered
B

5

8

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
Blub answered 5/7, 2014 at 4:21 Comment(7)
I've seen a lot of people run into problems when trying to keep Visual Studio projects and/or profiles/workspaces on any machine other than your local one (not remote servers). What happens when you try to create a new project completely on your local machine?Gideon
@Gideon This error is completely with the new project only. I am not trying to work on existing project.Blub
When you created the new project, did you create it on your local C drive, or on a remote server? Your error references "NAUNSW001". Is this a remote server? From the error, that's where it's looking.Gideon
I am creating on local drive -the error that I have referred above is coming when I am running IISExpress that has been congiured to use NAUNSW001, which is remote server.... do you know how can I force the web projects to use only IIS, rather than IISExpress?Blub
Go to the properties of your web application, and the "Web" tab. Change the server to external host, and then just put in localhost. Note, if you do this, you can only debug if you attach your debugger to IIS via Debug->Attach to processGideon
How are you using your office machine from home? Are you using Windows Remote Desktop? If so, what version of windows is the office computer, and what operating system is your home computer?Bothy
I got a laptop that I use in the office, and how I am using the same laptop from home. The difference only is that it does not have my network drives that stores some of these configurations that causing me trouble.Blub
B
9

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>
Blub answered 5/7, 2014 at 5:14 Comment(1)
Thank you! I had no idea a .user file i wasn't even aware was there would override the csprojSynesthesia
N
4

Please use the following path:

My Computer > Documents > IISExpress > config > applicationhost.config

Right click on applicationhost.config and go to "Properties" option. Now click advanced button and uncheck Encrypt contain security data.

Necessitarianism answered 19/5, 2016 at 5:59 Comment(1)
This worked like a breeze in a offshore delivery VM where the drive was encrypted.Goodell
H
0

I had the similar issue could not even start a web project in vs 2013. None of solutions suggested worked

So i tried the following

Gave read & write permission to following folder

C:\Program Files (x86)\IIS Express\config(default installation iisexpress8) made sure both subfolders schema and template have read & write access

Then went in to schema folder and renamed asp net_schema.xml and ran iisexpress.exe from command prompt.

It started iis express and successfully registered url "xxxx" for site "webisite1" application

After that i quit iisexpress and renamed the schema file again to the old name.

After that i had no issues starting a web project

Hartz answered 9/9, 2014 at 11:59 Comment(2)
ok. I am still living with manual process as below. If it works then I assure you to give you marks :)Blub
This is not the comment section. I know user's below 15 can't comment. So for it you should first increase your rep. You can put another question if this question don't get the appropriate output you're looking for but remember to avoid duplicate questions you should specify every details.Expugnable
W
0

I found this it in a strange manner! look for the IIS config file in my case it was. C:\Users\\OneDrive\Documents\IISExpress But accidentally my One Drive was paused. So it was able to access that files in the folder below. C:\Users\\OneDrive\Documents\IISExpress\config So just make sure IIS has access to configuration files.

Wanderlust answered 28/4, 2019 at 1:32 Comment(0)
A
0
  1. open C:\Program Files (x86)\IIS Express\config.
  2. open schema folder and rename ASPNET_schema (e.g ASPNET_schema1)
  3. copy in run and hit enter "C:\Program Files (x86)\IIS Express\iisexpress.exe" /userhome:c:\temp\iisexpress
Antecedency answered 2/10, 2019 at 9:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.