ASP.NET: Error 500

Status
Not open for further replies.

Elements

New Member
Messages
45
Reaction score
0
Points
0
Alright, other people have had this same problem, though I haven't found a solution yet on the forums.

Corey (all hail) recently moved me to the asp.net enabled server, whereupon I tested the ASP.NET site I uploaded. There's no code, just a master page that loads data from other pages and a theme, so there's nothing fancy. Still, accessing any part of it gives me error 500 with a lengthy callback trace. Doubt that'd be useful, though.

Any thoughts on how to fix this?
~ Ash
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Do you have a link to the page?
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I know nothing about ASP.NET so I'm not sure I can be much help.

All I can really say is a 500 error which it's showing is normally caused by permission problems.
 

Elements

New Member
Messages
45
Reaction score
0
Points
0
*idea*
any way to give execute permissions to all the files in my WindXP folder? That -might- solve it.

What seems fishy is that everyone who has an asp.net page on the server gets the same error. I don't think its anything we're doing :|
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Set 755 for your Aspx files & try. Hope, this will fix your issue.
 

Elements

New Member
Messages
45
Reaction score
0
Points
0
Just got back from working out of state. Very tired.

kajasweb: What do you mean by set 755 for my Aspx files?
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
He means to CHMOD your Aspx files to 755.
I've just tested this on your account and it didn't worked.

I'll investigate this issue and post back if I find something.
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
I've tried to find the problem but couldn't.

I think that the error has something to do with the: web.config file.
As you can see this file has this in it's code:
Code:
        <pages>
            <namespaces>
                <clear />
                <add namespace="System" />
                <add namespace="System.Collections" />
                <add namespace="System.Collections.Specialized" />
                <add namespace="System.Configuration" />
                <add namespace="System.Text" />
                <add namespace="System.Text.RegularExpressions" />
                <add namespace="System.Web" />
                <add namespace="System.Web.Caching" />
                <add namespace="System.Web.SessionState" />
                <add namespace="System.Web.Security" />
                <add namespace="System.Web.Profile" />
                <add namespace="System.Web.UI" />
                <add namespace="System.Web.UI.WebControls" />
                <add namespace="System.Web.UI.WebControls.WebParts" />
                <add namespace="System.Web.UI.HtmlControls" />
            </namespaces>
        </pages>

And the error you're getting says: No child nodes allowed here. (node name: pages) ()


I'm sorry, but I'm not familiar with ASP.NET and I can't be of more help.
 

Elements

New Member
Messages
45
Reaction score
0
Points
0
I have -no- idea.
I tried uploading a blank aspx page in the same project, which had the same result as viewing any other page. I'll try creating a new, blank site with a blank page and see if I have the same problem. If not, I'll see if I can narrow it down a bit; otherwise, I fear the problem might be on your end.
~ Ash


Edit: New asp.net site project, blank page with a line of text, same error.
Link: http://windstorm.elementfx.com/BlankASPX/Default.aspx
Also, that is the default web.config, so that shouldn't be a problem. The error seems to point to it, though, which doesn't many much sense.

Edit: I removed the <pages> entry from the web.config file as a test, and doing so had no effect: the error message remains unchanged. The error must be pointing elsewhere.
 
Last edited:

Elements

New Member
Messages
45
Reaction score
0
Points
0
Odd, I wasn't seeing any change in the error message earlier.

Time to fiddle :)


Edit (10:32) : Tedious fiddling. The server takes several minutes to realize that I made changes. :|

Edit (10:50) : Perhaps 'minutes' is not quite the right term....

Edit (11:00) : Renamed the Default.aspx file so as to incur a 404 error. No effect in the error message. Apparently it can still read it using the original filename :p

Edit (12:01) : Checked again; server realized I renamed the file and displayed the proper 404 error. Fixing this may take quite some time. =/

Edit (12:07) : Renaming the folder after every edit forces the server to re-load the files. Anyway, the error does indeed point to web.config, and the error is that the server does not like the <pages> xml node to have any child nodes (<namespaces> and <add namespace=... /> in this case), though removing them causes the server to not know what any types are, "_Default" included, thus causing an error parsing line 1:
Parser Error

Description: Error parsing a resource required to service this request. Review your source file and modify it to fix this error.

Error message:

Cannot find type _Default

File name: /home/elements/public_html/BlankAspx5/Default.aspx

Line: 1

Furthermore, removing that causes the parser to complain about the CodeFile= portion of the ASP.NET header. Removing that portion of the header (or removing the header completely) results in the parser not being able to tell what version of ASP the page uses, complaining yet again.

_______
In summary: The 500 error that the server has been giving people is a direct result of the parser reading the web.config file and finding the <namespaces> and <add namespace=... /> child xml nodes within the <pages> node block. Hence the "No child nodes allowed here" error message. These nodes in the file are both normal and required: removing them causes more problems. Think of them as includes in a C++ program; removing them will cause the compiler to lack essential data. In this case, however, leaving them in causes the parser to complain.
While I cannot ascertain the reason behind this, it is likely a server configuration error, not an error in the aspx or web.config files.
 
Last edited:
Status
Not open for further replies.
Top