Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7 Invalid Application Path, Win 7 [closed]

Getting "Invalid Application Path" error. Here are the steps I've taken.

  1. Right click on web site's root folder. Click "Add Virtual Directory".

  2. In window that opens, set alias to name of sub folder. WS

  3. Use browse button to navigate and set path to physical folder on drive. Click OK

  4. Click "Test Settings..." Pass-through authentication passes. But get warning that path cannot be verified. This looks to be normal.

    Click OK. And "WS" folder is now set as a virtual directory. (If I click "Basic Settings..." and test settings, still get above results.

  5. Right click folder. Select "Convert to Application". Leave all default values as they are. Click "Test Settings" and I get the error about invalid path. (This is with "Pass-through" authentication.)

  6. Connect as "Specific User" and this time, "Test Settings..." does not report any errors. Additionally the path is indicated as being "accessible".

So, the question is, why does "Pass Through" authentication not work?

Now, note that if I continue on and click OK to convert the virtual folder to an application, no error is raised. And I can run the web service (this is using pass-through authentication option for application).

So, what's the problem. Well, when I add the website to a VS 2008 solution, and try to build the website (I need to debug the web service). I get this error:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

But, the folder is an application. I just converted it. And, the web service runs just fine on the local host.

What details am I missing?

(In researching these problems, I did find out that multiple web.config files can cause the error of the site not building. I do not have multiple web.config files.)

like image 624
Karl Avatar asked Oct 29 '11 15:10

Karl


3 Answers

It had been suggested to me that IIS is/was corrupted. But, after experiencing this message on a new computer with a fresh Win 7 64-bit, IIS install and one new web site created, I have come to the conclusion that the message itself is a bug and that it is benign. That is, the application and website will run as expected. This opinion has not been contradicted on the MS IIS forum since I posted this several months ago.

See this thread: http://forums.iis.net/p/1182820/2000936.aspx

like image 183
Karl Avatar answered Oct 28 '22 16:10

Karl


Found a solution for my error:

in the folder c:\inetpub\wwwroot I had a folder with the same name I wanted the Application to have

something like: C:\inetpub\wwwroot\TestWebsite

in IIS this wasn't an application but was showing as a folder

when I tried to create an application in IIS with Alias TestWebsite, was giving me that error even when was in a completely different physical path

check there is no folder with the same name as the Alias for the application you are creating in the wwwroot folder

wasn't permissions in my case

hope it helps someone

I also recommend removing the Alias from IIS using command appcmd located in C:\Windows\System32\inetsrv see this link explaining how

like image 23
Carlos R Balebona Avatar answered Oct 28 '22 14:10

Carlos R Balebona


I just ran into this problem and it was caused when I canceled out of an iisreset before the web server restarted.

Make sure your IIS server and application pools are started. iisreset

like image 31
KevM Avatar answered Oct 28 '22 14:10

KevM