tags:

views:

2035

answers:

3

Hello,

I’m running IIS 5 on Windows XP professional


I created new Web project and configured VS 2008 to save this application to location c:\Inteput\wwwroot. Thus VS saved the project into directory:

c:\Inteput\wwwroot\WebApplication1


I then transformed this WebApplication1 folder into virtual directory (this virtual directory is also configured as web application). But whenever I try to access:

c:\Inteput\wwwroot\WebApplication1\WebApplication1\default.aspx

through browser using URL:

http://localhost/WebApplication1/WebApplication1/default.aspx

, I get an exception saying:

Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: 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.


Any ideas what I'm doing wrong?

BTW - Virtual directory does have Read and Run scripts permissions set

Q2 - How do I configure Visual studio to run Web app via IIS and not via integrated web server? Thus so that when I’d press CTRL+F5, the browser would be server a page by IIS and not by integrated web server?

thank you

+1  A: 

You say it is running as an application - is is using the right ASP.NET version? (2.x)

Re debugging in IIS; you do that on the project properties - on the Web panel I believe; change it to "Use Local IIS Web Server" and enter the url to the application root on localhost.

Marc Gravell
+1  A: 

I think this is a problem with you web.config, can you please supply yours? Have you got more that one?

I've had an error like this one before, it doesn't quite fit what you are saying, but maybe you left out some details.

Basically if you have an application, you should not configure the MachineToApplication settings in web.config's in the subdirectories. Although I suppose other things can make this error turn up.

Oh I bet you do have two web.configs

here c:\Inteput\wwwroot\WebApplication1\web.config

and here c:\Inteput\wwwroot\WebApplication1\WebApplication1\web.config

DrG
A: 

Hello,

1 - It works now. I created new virtual directory

c:\Inteput\wwwroot\Testing

and copied everything from

c:\Inteput\wwwroot\WebApplication1\WebApplication1

into this new directory, so that now web.config was in the root directory of an application.

A)

certain web.config settings are only allowed in an Applications root.

So was that my web.config one that is only allowed in Application root? How can I know for sure?



2 -

Re debugging in IIS; you do that on the project properties - on the Web panel I believe; change it to "Use Local IIS Web Server" and enter the url to the application root on localhost.

Found it, but now I get the following error:

Access is denied. Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.

Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:\Documents and Settings\kaja\My Documents\Visual Studio 2008\Projects\WebApplication8\WebApplication8\Default.aspx'.



thanx

SourceC