포스팅 목차
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!
Posted on July 9th, 2008 by Shell
Filed under: Web design
===============================================================
1. 사이트 클릭 해서
IIS 에 ASP 더블클릭
2. 디버깅 속성 에서 "브라우저에 오류전송"을 false 에서 true로 변경
3. 다시 사이트 메인에 IIS 에 오류 페이지 더블클릭!
4. 마우스 오른쪽 버튼 클릭-> 두번째 "자세한 오류" 선택후 확인