We just purchased a new VPS Windows 2003 server. I setup one of my domain names and uploaded the files for the site and it shows up fine.
To test some small things, I created a folder in the httpdocs called "test" and put a test.html file with just simple HTML to test the folder. The first problem I have, is that when I go to that address, it wants a username and password and I have to enter
my accounts username and password in order to show the html file.
The second problem that I have, is when I create a simple website in Visual Web Developer 2008 Express Edition, a single webpage blank. Brand new, nothing on it. I upload it to the server through my FTP client and when I browse to the page, and I get a Server
Error in '/' Application error. If I create a aspx file named "Test.aspx" with just HTML in it, and upload it to the folder, I get the same error. If i delete the web.config file from the folder, the test.aspx works, but the regular VWD2008 site still gives
the Server Error in '/' Application error.
Is something messed up with asp or do I need to do another step before uploading?
This is my first 2003 ASP.NET server.
Check in IIS console, web site properties:
1. Directory security settings - Anonymous access and authentication control.
2. ASP.NET - ASP.NET Version, just set to correct one, if it's set to 1.1 and you use different you will receive app error.
I check the directory security for the website and In the Authentication Methods the box is checked for "Enable Anonymous access". And the username field has "IUSR_wwedge" which "wwwedge" is the sites username. and the password field has a password in it
but is ****'d out.
At the bottom of the window, the only other box checked is "Integrated Windows authentication"
This is the error I get from the 2nd problem
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 49: ASP.NET to identify an incoming user.
Line 50: -->
Line 51: <authentication mode="Forms" />
Line 52: <!--
Line 53: The <customErrors> section enables configuration
What do you mean "nested" web.config files? There is only one in the folder and I thought every site published that used .NET needs its own web.config file?
And I fixed the first problem, for some reason IIS made the "test" folder its own website and I had to give it anonymous access through IIS Console.
The first error is from one of two things. Either the password in your anonymous user's setting is wrong, or it's from not having the right permissions on disk. In IIS Manager, right-click on the site and click edit permissions. That will open the security
tab of the NTFS permissions for the website's folder. Ensure that the anonymous user has at least read permissions there.
For the 2nd error, the issue is that you have your code in a subfolder that isn't marked as an application. By default, only the root folder of the site is marked as an application. That means that it uses the /bin folder and other application folders
off of the root folder, and it won't use the bin, app_code, etc folders that uploaded to a subfolder for your project. Essentially the asp.net folders off of the application root (in this case it's the root of the site) are the only ones used. You should
ask your host, or use whatever control panel they gave you, to mark that folder as an application. The particular error you have is from forms auth not being allowed to be set on a regular folder.
A quick answer on "nested" web.config files (although the issue isn't from that) . . . web.config files inherit all the way down the path. So, a web.config file in the root will be seen by all subfolders, even ones marked as an application. In other words,
web.config files cross application boundaries. That's not the case for the systems folders and global.asax. They will not cross application boundaries. So, the assemblies in the /bin folder in the root of the site will not be available in any folders marked
as an application.
Ok, I Remote Desktop'd to the server and used the IIS Manager and created a website under the domain and told it to use my certain folder where the files are, as well as have anonymous access to it, and also Read and execute options.
Still nothing. The root folder only has some html files and pictures, no other Bin folders or ASPX files or web.config or anything. The error still comes up at the same line.
I also tryed setting up a Virtual Directory pointing to the same folder and I still get the error.
I really want to be able to deply some of my Web Developer websites and all of this is just keeping me that much farther away. I just dont seem to get why its happening with a BLANK website.
You mentioned 2 errors. Let me make sure that I understand where you are:
1. Password prompt when you want it to not prompt. Is that fixed now?
2. You get the error that shows the forms auth line in web.config and it says that you can't apply that setting outside of an applicaton. Is that still the same error? If so, something in the virtual directory that you setup didn't work. Here is how you
should do it. First, remove the virtual directory. While that should work, it's not the easiest way. Right click on your folder where you are placing the files and the on the home directory tab, click "Create". That will mark the folder as an application
and should take care of your 2nd issue.
I check the directory security for the website and In the Authentication Methods the box is checked for "Enable Anonymous access". And the username field has "IUSR_wwedge" which "wwwedge" is the sites username. and the password field has a password in it
but is ****'d out.
At the bottom of the window, the only other box checked is "Integrated Windows authentication"
Which do you really want? If you want anonymous access, uncheck Winodws integrated authentication. If you want Windows integrated, add the domain to IE's intranet zone so IE trusts the domian and passes credentials.
indoubt88
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.
If you have the application in a directory, virtual or otherwise, and have not configured it as an application, as the error suggests, then do so. It the application is in a folder configured as an application, you have a web.config in a parent or child
directory that already has a MachinjeToApplication definition and need to either remove the second (nested) web.config or modify it so it only has those functions which may be changed by a child web.config file.
indoubt88
Member
1 Points
9 Posts
New 2003 server, permission and aspx problems.
Feb 08, 2008 02:31 AM|LINK
We just purchased a new VPS Windows 2003 server. I setup one of my domain names and uploaded the files for the site and it shows up fine.
To test some small things, I created a folder in the httpdocs called "test" and put a test.html file with just simple HTML to test the folder. The first problem I have, is that when I go to that address, it wants a username and password and I have to enter my accounts username and password in order to show the html file.
The second problem that I have, is when I create a simple website in Visual Web Developer 2008 Express Edition, a single webpage blank. Brand new, nothing on it. I upload it to the server through my FTP client and when I browse to the page, and I get a Server Error in '/' Application error. If I create a aspx file named "Test.aspx" with just HTML in it, and upload it to the folder, I get the same error. If i delete the web.config file from the folder, the test.aspx works, but the regular VWD2008 site still gives the Server Error in '/' Application error.
Is something messed up with asp or do I need to do another step before uploading?
This is my first 2003 ASP.NET server.
HostingASPNe...
All-Star
15922 Points
2982 Posts
Re: New 2003 server, permission and aspx problems.
Feb 08, 2008 11:09 AM|LINK
Hello,
Check in IIS console, web site properties:
1. Directory security settings - Anonymous access and authentication control.
2. ASP.NET - ASP.NET Version, just set to correct one, if it's set to 1.1 and you use different you will receive app error.
Regards
Free ASP.NET Examples and source code.
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: New 2003 server, permission and aspx problems.
Feb 08, 2008 11:28 AM|LINK
First question is answered at www.iis.net. For the second, it would be nice to know the error.
Jeff
indoubt88
Member
1 Points
9 Posts
Re: New 2003 server, permission and aspx problems.
Feb 08, 2008 01:11 PM|LINK
I check the directory security for the website and In the Authentication Methods the box is checked for "Enable Anonymous access". And the username field has "IUSR_wwedge" which "wwwedge" is the sites username. and the password field has a password in it but is ****'d out.
At the bottom of the window, the only other box checked is "Integrated Windows authentication"
This is the error I get from the 2nd problem
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:
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: New 2003 server, permission and aspx problems.
Feb 08, 2008 08:44 PM|LINK
The first error is an IE issue. Add the domain to IE's intranet zone. The second is because you have nested web.config files.
Jeff
indoubt88
Member
1 Points
9 Posts
Re: New 2003 server, permission and aspx problems.
Feb 08, 2008 10:57 PM|LINK
What do you mean "nested" web.config files? There is only one in the folder and I thought every site published that used .NET needs its own web.config file?
And I fixed the first problem, for some reason IIS made the "test" folder its own website and I had to give it anonymous access through IIS Console.
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: New 2003 server, permission and aspx problems.
Feb 10, 2008 04:58 AM|LINK
Actually, I disagree on both errors.
The first error is from one of two things. Either the password in your anonymous user's setting is wrong, or it's from not having the right permissions on disk. In IIS Manager, right-click on the site and click edit permissions. That will open the security tab of the NTFS permissions for the website's folder. Ensure that the anonymous user has at least read permissions there.
For the 2nd error, the issue is that you have your code in a subfolder that isn't marked as an application. By default, only the root folder of the site is marked as an application. That means that it uses the /bin folder and other application folders off of the root folder, and it won't use the bin, app_code, etc folders that uploaded to a subfolder for your project. Essentially the asp.net folders off of the application root (in this case it's the root of the site) are the only ones used. You should ask your host, or use whatever control panel they gave you, to mark that folder as an application. The particular error you have is from forms auth not being allowed to be set on a regular folder.
A quick answer on "nested" web.config files (although the issue isn't from that) . . . web.config files inherit all the way down the path. So, a web.config file in the root will be seen by all subfolders, even ones marked as an application. In other words, web.config files cross application boundaries. That's not the case for the systems folders and global.asax. They will not cross application boundaries. So, the assemblies in the /bin folder in the root of the site will not be available in any folders marked as an application.
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com
indoubt88
Member
1 Points
9 Posts
Re: New 2003 server, permission and aspx problems.
Feb 10, 2008 10:04 AM|LINK
Ok, I Remote Desktop'd to the server and used the IIS Manager and created a website under the domain and told it to use my certain folder where the files are, as well as have anonymous access to it, and also Read and execute options.
Still nothing. The root folder only has some html files and pictures, no other Bin folders or ASPX files or web.config or anything. The error still comes up at the same line.
I also tryed setting up a Virtual Directory pointing to the same folder and I still get the error.
I really want to be able to deply some of my Web Developer websites and all of this is just keeping me that much farther away. I just dont seem to get why its happening with a BLANK website.
OWScott
Participant
1939 Points
360 Posts
ASPInsiders
MVP
Re: New 2003 server, permission and aspx problems.
Feb 10, 2008 03:21 PM|LINK
You mentioned 2 errors. Let me make sure that I understand where you are:
1. Password prompt when you want it to not prompt. Is that fixed now?
2. You get the error that shows the forms auth line in web.config and it says that you can't apply that setting outside of an applicaton. Is that still the same error? If so, something in the virtual directory that you setup didn't work. Here is how you should do it. First, remove the virtual directory. While that should work, it's not the easiest way. Right click on your folder where you are placing the files and the on the home directory tab, click "Create". That will mark the folder as an application and should take care of your 2nd issue.
Microsoft MVP - IIS
Vaasnet
www.vaasnet.com
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: New 2003 server, permission and aspx problems.
Feb 10, 2008 06:45 PM|LINK
Which do you really want? If you want anonymous access, uncheck Winodws integrated authentication. If you want Windows integrated, add the domain to IE's intranet zone so IE trusts the domian and passes credentials.
If you have the application in a directory, virtual or otherwise, and have not configured it as an application, as the error suggests, then do so. It the application is in a folder configured as an application, you have a web.config in a parent or child directory that already has a MachinjeToApplication definition and need to either remove the second (nested) web.config or modify it so it only has those functions which may be changed by a child web.config file.
Jeff