IT_Programming/ASP.NET (WEB)

웹 2.0 시대에 ASP.NET 2.0에서 몇가지 참고할 부분들...

JJun ™ 2007. 2. 11. 13:01
LONG

[인터넷지식]HTTP 500 내부서버오류 에러 해결 방법]

 

HTTP 500 - 내부 서버 오류란 말그대로 보고자 하는

웹페이지의 서버 쪽 소스에 이상이 생겼을 때 나타나는 현상입니다.

MS사 측에서 소스 스크립트 에러가 브라우저 화면에 그대로 노출되는 것을 방지하기 위해 explorer 브라우저 상에 기본 옵션으로 지정해 놓은 기능입니다. 웹페이지 개발자 또는 관리자들은 실제 에러를 볼 수 있어야 하므로, 

아래와 같은 절차로 HTTP 500 메세지 표시 기능을 해제한 후

소스상의 문제점을 수정하시기 바랍니다.

 

ⓐ 아래의 그림과 같이 HTTP500에러가 발생을 하게 됩니다.

 

 

 

 

ⓑ 익스프롤러 메뉴의 도구 => 인터넷 옵션 => 고급탭을 클릭합니다.
     그후 아래의 HTTP 오류메시지표시 항목을 체크을 해제 => 확인을 클릭합니다.


 

 

ⓒ 익스프롤러의 새로 고침버튼을 누르면 실제 에러가 표시 됩니다.

ARTICLE

[ASP.NET 2.0] 다이얼로그박스에서 새창 띄워지는것 막기]

 

ASP.NET 2.0에서 부모창에서 자바 스크립트로

result = window.showModalDialog('CampaignList.aspx',null,'dialogWidth: 650px;

                                                   dialogHeight:400px; ');

 

이렇게 다이얼로그박스를 띄운후, 다이얼로그박스로 띄워진 창에서

서버 포스트를 하게 되면 무조건 새창이 떠 버린다.

 

ASP.NET 1.0 시절에는 안 그랬던 것 같은데, 자세한 이유는 모르겠다.

 

그래서 자식 소스에 아래와 같은 부문을 써 주면 새창이 안 뜨고 자기 자신으로 서버 포스트를 받는다.

 

<head id="Head1" runat="server">
    <title>캠페인 선택</title>
    <!-- 디이얼로그에서는 이 부분이 있어야 postback 될때 현재창에서 열린다.

           그렇지 않으면 새창에서 열린다. -->
   
<base target="_self" />
</head>

 

 

==============================================================================================

 

 

[ Vista에서 VS 2005와 IIS7 설정하기 ]

 

비스타에서 VS 2005와 IIS7을 사용하는데 있어 약간의 셋팅이 필요하다.

그렇지 않으면 각종 에러가 나온다. 예를 들면 frontpage server extensions가 없다느니

하는 에러도 나온다. 하지만 아래와 같이 설정을 하면 큰 무리없이 쉽게 사용할 수 있다.

특히 UAC 기능은 차라리 OFF 하는 것이 개발하는데에는 편하다.

VISTA를 처음 설치하면 IIS의 인증 중에 windows 통합 인증이 기본으로 설치가 되지 않는다.

하지만 VS Studio 2005와 같이 디버깅을 하면서 개발 하려면 이 통합 인증도 같이 설치해 주어야 한다.

  

  

출처: http://weblogs.asp.net/scottgu/archive/2006/09/19/Tip_2F00_Trick_3A00_-Using-IIS7-on-Vista-with-VS-2005.aspx

 

Tip/Trick: Using IIS7 on Vista with VS 2005

A few people have pinged me over the last week asking about how to use VS 2005 with an IIS 7.0 web-site on Windows Vista.  Specifically, they've run into an issue where they see a dialog message asking them to install the FrontPage Server Extensions, or they get a "You must be a member of the administrators group" message when they try to connect (see dialog below):

 

 

Bradley has published a nice blog post that describes detailed steps on how to enable VS 2005 to connect to IIS 7.0.  To quickly summarize you need to follow the below two steps to enable it:

1) You need to make sure that you have the the optional "IIS 6 Management Compatibility" option installed within IIS7.  This installs an API for the new configuration system that is compatible with the old Metabase APIs (which is what VS 2005 uses).  You can select this using the "Turn Windows Features on or Off" option in the Vista Control Panel:

 

 

 

2) You need to make sure you launch VS 2005 with "elevated" privledges so that you have admin privledges to connect to IIS (this is needed to debug a service, as well as create sites and/or change bindings that impact the entire machine).  You can do this by right-clicking on the VS icon and select the "Run as Administrator" option when launching VS:

 

Note that this is needed even if your user is already in the administrators group if you have UAC enabled

(which is on by default with Vista).  If you disable UAC

(which you can also do via the control panel), then this second step isn't required.  Running VS 2005 with "elevated" privledges won't be required if you use the built-in VS 2005 Web-Server (since it has reduced privledges already).  It is only required when connecting and running/debugging with IIS locally.

We'll be updating Visual Studio 2005 to have more accurate error messages to help guide you to the above steps more naturally in the future.  Until then, just use the above steps and you are good

to go. Hope this helps,Scott

 

==============================================================