I have been trying to work my issues out with my ASP.NET sites and IIS. Recently I downloaded a Starter Kit and built it and then published it to my server. After doing so, I went to the web address and got the following error:
Server Error in '/' Application.
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.
Source Error:
Line 10: <customErrors mode="RemoteOnly"/>
Line 11: <compilation debug="true"/>
Line 12: <authentication mode="Forms">
Line 13: <forms loginUrl="Default.aspx" protection="Validation" timeout="300"/>
Line 14: </authentication>
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. (c:\inetpub\wwwroot\qwertytech\web.config line 19)
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. (c:\inetpub\wwwroot\qwertytech\web.config line 20)
</div> <script type=text/javascript> function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } } </script>
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
What could I have done when i just built it and then published it?
You dropped your new site into a qwertytech folder under your site root. The issue is that the web.config settings require that that folder be marked as an application. The <authentication> tag cannot be run in a normal folder.
Since it's a standalone site that you want to be marked as an application anyway, just go to IIS and edit the properties for the qwertytech folder. In the home directory tab, create the folder as an application. This will essentially create that project
as its own website within a website and the /qwertytech folder will be set as an application root. Then that setting will be allowed to be processed.
Sure. Fire up IIS and expand the websites and your website. You'll see your folder which should have a normal looking icon. Right-click on the folder and click properties. Now, take note of the application pool (I'm assuming IIS 6). Click on "Create".
Now, due to a bug that has always been there, the app pool will change to DefaultAppPool (which may be what you have anyway). Now change the application pool to what it's supposed to be and click Apply. Now you'll have a folder that has become an application
root which should take care of that issue for you.
You need to drill down one level deeper to the qwertytech folder under the QWERTYtech site. That's the one that needs to be marked as an application. That should do the trick.
Well when you click on the globe that says QWERTYtech, it has all of my site folders directly under it.... do i need to have a folder called QWERTYtech with all of my site stuff in it?
Based on your error message, it's a folder called QWERTYtech that has the web.config file:
(c:\inetpub\wwwroot\qwertytech\web.config line 19)
Is that the root of your site c:\inetpub\wwwroot, or c:\inetpub\wwwroot\qwertytech?
The issue is happening because you don't have the c:\inetpub\wwwroot\qwertytech folder marked as an application. Let me give the answer for both situations:
Situation A: c:\inetpub\wwwroot\qwertytech is the root of your site and web.config is in the site root.
If you get that error from that, you have a unique situation. Go to the home directory tab of the site properties and there is an application section. Click on the "Create" button and it should add it back again. That should only be missing if you deleted
it manually. It's there by default.
Situation B: c:\inetpub\wwwroot is the root of the site and qwertytech is a subfolder. In that case, yes, you'll have a folder in the qwertytech site called qwertytech. That needs to be marked as an application.
Humm, what you have there is correct, as far as a website is concerned. The Default Application shows that your site is configured correctly. Let's step back and look at the big picture. Can you confirm the following? This is what I believe you are saying
that you have:
<div mce_keep="true">You have a website called QWERTYtech</div>
<div mce_keep="true">The site root is c:\inetpub\wwwroot\qwertytech (please confirm this. It's in the home directory tab of your site)</div>
<div mce_keep="true">Your website was placed in c:\inetpub\wwwroot\qwertytech. This means that you have a web.config file at c:\inetpub\wwwroot\qwertytech\web.config</div>
<div mce_keep="true">When you view your website, you viewed it like http://yourDomain_or_IP/. You did not view it like this: http://yourDomain_or_IP/quertytech/</div>
<div mce_keep="true">Your issue still occurs now and it's exactly the same as you posted above.</div>
If all of those are true then . . . well . . . they can't all be true. ;) Which one of those are incorrect?
QWERTYtech
Member
77 Points
366 Posts
Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 10, 2007 02:08 AM|LINK
Hey everyone,
I have been trying to work my issues out with my ASP.NET sites and IIS. Recently I downloaded a Starter Kit and built it and then published it to my server. After doing so, I went to the web address and got the following error:
Server Error in '/' Application.
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.
Source Error:
Source File: c:\inetpub\wwwroot\qwertytech\web.config Line: 12
<div class=expandable onclick="OnToggleTOCLevel1('additionalConfigurationErrors')">Show Additional Configuration Errors:</div> <div id=additionalConfigurationErrors>
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
What could I have done when i just built it and then published it?
QWERTYtech
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 13, 2007 02:17 PM|LINK
Hey QWERTYtech,
You dropped your new site into a qwertytech folder under your site root. The issue is that the web.config settings require that that folder be marked as an application. The <authentication> tag cannot be run in a normal folder.
Since it's a standalone site that you want to be marked as an application anyway, just go to IIS and edit the properties for the qwertytech folder. In the home directory tab, create the folder as an application. This will essentially create that project as its own website within a website and the /qwertytech folder will be set as an application root. Then that setting will be allowed to be processed.
Thanks,
Scott
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com
QWERTYtech
Member
77 Points
366 Posts
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 14, 2007 02:24 AM|LINK
I'm lost on what to do... I'm new to IIS. Can you give a little more details?
QWERTYtech
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 14, 2007 02:59 PM|LINK
Sure. Fire up IIS and expand the websites and your website. You'll see your folder which should have a normal looking icon. Right-click on the folder and click properties. Now, take note of the application pool (I'm assuming IIS 6). Click on "Create". Now, due to a bug that has always been there, the app pool will change to DefaultAppPool (which may be what you have anyway). Now change the application pool to what it's supposed to be and click Apply. Now you'll have a folder that has become an application root which should take care of that issue for you.
Thanks,
Scott
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com
QWERTYtech
Member
77 Points
366 Posts
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 14, 2007 10:06 PM|LINK
Okay, I launched my IIS6 and got the following:
Default Web Site
QWERTYtech
Another Site</div>
Okay, whenever I expand the Web Sites, i see little globes. I don't get a folder...... I'm a little confused.
QWERYtech
QWERTYtech
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 14, 2007 10:15 PM|LINK
You need to drill down one level deeper to the qwertytech folder under the QWERTYtech site. That's the one that needs to be marked as an application. That should do the trick.
Thanks,
Scott
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com
QWERTYtech
Member
77 Points
366 Posts
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 15, 2007 03:34 AM|LINK
Well when you click on the globe that says QWERTYtech, it has all of my site folders directly under it.... do i need to have a folder called QWERTYtech with all of my site stuff in it?
QWERTYtech
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 15, 2007 10:45 PM|LINK
Based on your error message, it's a folder called QWERTYtech that has the web.config file: (c:\inetpub\wwwroot\qwertytech\web.config line 19)
Is that the root of your site c:\inetpub\wwwroot, or c:\inetpub\wwwroot\qwertytech?
The issue is happening because you don't have the c:\inetpub\wwwroot\qwertytech folder marked as an application. Let me give the answer for both situations:
Situation A: c:\inetpub\wwwroot\qwertytech is the root of your site and web.config is in the site root.
If you get that error from that, you have a unique situation. Go to the home directory tab of the site properties and there is an application section. Click on the "Create" button and it should add it back again. That should only be missing if you deleted it manually. It's there by default.
Situation B: c:\inetpub\wwwroot is the root of the site and qwertytech is a subfolder. In that case, yes, you'll have a folder in the qwertytech site called qwertytech. That needs to be marked as an application.
I hope that helps.
Thanks,
Scott
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com
QWERTYtech
Member
77 Points
366 Posts
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 16, 2007 05:14 PM|LINK
Okay, I'm looking at my Home Directory tab and there is no "create" button. This is what I have in my application settings:
Application Name: Default Application <BTN>REMOVE</BTN>
Starting Point: <QWERTYtech>
<BTN>CONFIGURATION...</BTN>
Execute Permissions: Script Only
Application Pool: DefaultAppPool
This is what I have... I'm not quite sure what to do...
QWERTYtech
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: Getting an error when just trying to view a PUBLISHED Starter Kit
Sep 16, 2007 10:06 PM|LINK
Humm, what you have there is correct, as far as a website is concerned. The Default Application shows that your site is configured correctly. Let's step back and look at the big picture. Can you confirm the following? This is what I believe you are saying that you have:
If all of those are true then . . . well . . . they can't all be true. ;) Which one of those are incorrect?
Thanks,
Scott
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com