IT/운영체제 / / 2015. 3. 26.

window2008 iis7 내부서버오류보기

포스팅 목차

    Okay this is a real techie post, but it tackles a problem we’ve encountered in the IIS7 web servers we’re using for BiteSizedJapan, and frankly it’s been driving me insane!!

    The problem: By default, the security in IIS7 prevents “meaningful” error messages from being displayed in remote browsers. If your classic ASP application crashes, or has a script bug, you get the generic “500″ error page. Which is totally useless if you are trying to debug. Microsoft cite security reasons for doing this, which I guess makes sense - after all detail error messages can expose all kinds of inner workings of your site. But then you should never expose an incomplete bug-ridden site to the public, right?

    It took me a good while to work out how to turn on error messages for remote browsers (browsers that are not running on the server itself, in other words everyone except us code-monkeys).

    • Remote to your server console, and from Server Manager select the Web Server (IIS) Role 
    • Click your server name and get up the Internet Information Services Manager (icon view) 
    • Select ASP from the bottom section 

    • Change the debug properties for “Send Errors To Browser” to “True” 

    Now this much you can find from the Microsoft blogs and forums. What they don’t tell you is for it to work you also need to modify your error page settings:

    • Back in the IIS Manager, choose Error Pages 
    • From the right hand panel, choose “Edit Feature Settings…” and you’ll get a new dialog. 

    • Change the selected option to “Detailed Errors” (the second option). 

    Now detailed ASP and other error messages will be sent to a browser visiting your site… and makes debugging heck of a lot easier!

     


    • 네이버 블로그 공유
    • 네이버 밴드 공유
    • 페이스북 공유
    • 카카오스토리 공유