Viewing ASP.NET errors on a Headless Linux System running Mono
I'm developing an asp.net application on windows 7 visual studio 2010, then publishing it to a Headless (NO GUI) linux server which runs mono.
I'm getting the error that tells you viewing errors from a remove machine is not possible unless you do some magic on the web.config.
Usually, i remote desktop into the server and load the page so i can see the e开发者_运维百科rror. But in this case since the server is headless i cannot do that. I don't really feel like doing a wget or curl... I just want to pull up the error in a browser. HOW CAN I DO THAT?
I've tried doing what the error message says and this is what my current web.config looks like:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
</configuration>
I am uncertain as to why the change to web.config doesn't work, it certainly looks correct.
Are you able to install firefox on the headless server?
If so you could run an X server on your development machine (like XMing) and forward the xsession over SSH
I'm doing something similiar (developing on Win7 .Net and deploying to Amazon Linux). An easy way to see the full error message is to install Lynx (a lightweight text-based web browser) on your linux server, and then browse to the troublesome page locally! It works for me anyway! :-)
精彩评论