开发者

Internal server error on ASP.NET

How can an internal server error be debugged? I'm using ASP.NET and published straight to the server via FTP with Visual Studio. I logged in and the files seem to be there and correct. How can I even begin to debug the associated problem? I've looked at some of the other questions about this and their answers were not particularly helpful. I know that my code is not throwing an error or exception because, well, there's no code, I only added a button in the designer and that's it. I know that the server is running ASP.NET 4, because the default project (I changed to starting from an empty project) worked just fine ten minutes ago. Any suggestions?

Edit:

The default project doesn't work anymore, and I don't have access rights to, well, my own database, or the application event logs. Time to go bug the server admin :( thanks for the help.

Edit: No, wait, no开发者_如何学Pythonw it's a run-time error, and I should turn customErrors off to view it, but customErrors are already off.


You say it worked with the default project before - copy the web.config file from the default project, and see if it works. If it does, then you can gradually take bits out until it stops working, and you should find which bit is causing problems.

If you have remote desktop access to the server, you can also try accessing it locally (error messages are probably suppressed when viewing from a remote location)


You might be able to use the Application event log in Windows to see what happened. You can also look at the ELMAH library, which I've found very useful for debugging errors on a server other than my dev machine.


Well, if setting the customeerrors to off in the web.config file isn't showing you the error, the error should be showing up in the Application event log on the server. I'd look there to see if you see the error.


Have you tried to enable debugging (debug="true") in your web.config file? About web.config. If you are able to run your server up to this point, it is much easier to resolve your issue.

?


Turns out that there was a pre-created directory on the server which has the special permissions needed to run from IIS, and some publish tool I used deleted it. When re-created, it didn't have the requisite permissions, causing the error. This was only solvable by the server admin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜