开发者

How to get an error message out of my webpage

开发者_开发百科

I have a web page that when I run it on a remote computer I get the message saying that remote errors cannot be viewed

When I go to view it on my web server machine, I get a message saying:

Internet Explorer cannot display the webpage 

  • Most likely causes:
  • You are not connected to the Internet. 
  • The website is encountering problems. 
  • There might be a typing error in the address.  

What you can try: 
     Check your Internet connection. Try visiting another website to make sure you are connected.  

     Retype the address.  

     Go back to the previous page. 

I can get to google fine, so it is not the internet connection.... But this message gives me nothing to work on. How can I get more info as to why my page is not working?

I tried going to IIS Mananger and right clicking on the site and selecting browse. But my site is an HTTPS site so that does not work.

Any ideas would be great.


The quick and dirty fix would be to edit the web.config of your ASP application like that error message says so that you can see what the error is on Remote Machines. I would also check the Server logs to see if anything has been reported there.

Make sure there is a customErrors tag with the mode attribute set to "Off"

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Remove this through in production, because you don't want outsiders to see these error messages and get information about the workings of your application, which is a security risk.

UPDATE

As for your error on your local IE make sure that the option

view friendly http error messages is disabled. In IE8 it is under:

Tools > Internet Options > Advanced

This might fix the problem of IE showing that cryptic message.


Try to run that same code locally. You can write a log on exceptions. and can view that log. These are disabled on such servers for security of your website.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜