开发者

Taking my ASP.NET from my local comp to the server

开发者 https://www.devze.com 2022-12-24 14:37 出处:网络
So I have been deve开发者_JAVA百科loping a small ASP.NET web app in C# for my company over the past few weeks and now I am trying to push it onto our Rackspace server.First step was to create a virtua

So I have been deve开发者_JAVA百科loping a small ASP.NET web app in C# for my company over the past few weeks and now I am trying to push it onto our Rackspace server. First step was to create a virtual directory because we want it to be www.ourdomain.com/appname/ and most of the stuff on ourdomain.com is currently in classic ASP. So I did this and then uploaded my stuff to the new folder. I *think* I did this at least semi-right because the error message I am getting is that nice puke color (ASP.NET style instead of classic ASP style) -- problem is it is generic and just saying runtime error. I tried just copy/pasting <customErrors mode="On" /> into the web.config file in the /appname/ directory but nothing changed

So the actual questions are:

  • How can I get a more descriptive error, when I was developing locally I just pushed the "play button" in VS2010 and it would either show me the app or tell me where I screwed up
  • Is there anything else I'm doing wrong that may be causing this? If there's things I need to check lemme know!


> I tried just copy/pasting
> <customErrors mode="On" /> into the
> web.config file in the /appname/
> directory but nothing changed

You need <customErrors mode="Off" />


If you can go with remote desktop in your server you can load your page under rd and you'll have your error message. You can also see it in the event viewer.

Or you can catch the exception in your global.asax :

http://www.nikhedonia.com/notebook/entry/three-ways-to-catch-exceptions-in-asp-net/

see under "Catching Exceptions at the Application Level"

where you can send the exception details to your mailbox or in a file for instance.


I think you want to turn off customErrors. You might also want to log all errors by capturing the event in the Application_Error event on the global.asax page.


Listen to exactly what that message is telling you to get a more descriptive error message. By default, the error messages are only detailed when accessing the site from the server computer (in your dev environment, that would be YOUR computer, but not once you deploy to your server). Once you set the settings just how that screen tells you, you should see the full error message.

0

精彩评论

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

关注公众号