Microsoft MVP성태의 닷넷 이야기
스마트 클라이언트 - Diagnosing Control in browser issues [링크 복사], [링크+제목 복사],
조회: 10992
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 4개 있습니다.)
원본 : http://blogs.msdn.com/andrewdownum/archive/2006/02/10/Using_DebugIEHost.aspx

Diagnosing Control in browser issues

 

Controls hosted in the browser can often be difficult to debug.  If anything goes wrong with loading the dll or constructing the control instance, you will get nothing but the standard IE "something is wrong" image (the small icon in the top-left with colored shapes). 

Here's how I recommend diagnosing these issues:

1.  Turn on the debug log for IEHost

  • Add a DWORD to
    HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework called "DebugIEHost" and set the value to 1
  • Add a String to
    HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework called "IEHostLogFile" with the full path (I use c:\windows\temp\IEHostLog.log)

2.  Restart Internet Explorer (the log won't work if you don't) and navigate to your control.

3.  Look for the log file (it will be in the location you specified and appended with a number (usually 1).

 

It will look something like this for a successful control instantiation:

Creating security manager

Microsoft.IE.Manager: Microsoft.IE.Manager: unique id lgth = 46

Microsoft.IE.SecureFactory: Create SecureFactory() with security information

Microsoft.IE.Manager: Created secure factory

Microsoft.IE.SecureFactory: Creating instance of the object in the correct domain

Microsoft.IE.SecureFactory: pUrl = http://ControlHostDomain/path/to/page/test.html

Microsoft.IE.SecureFactory: id = 86474707A3163707E65647D24756374777562610000000

Microsoft.IE.SecureFactory: link =

Microsoft.IE.SecureFactory: licenses =

Microsoft.IE.Manager: Url = http://ControlHostDomain/path/to/page/test.html

Microsoft.IE.Manager: UrlGetPartW returned 0

Microsoft.IE.Manager: UrlGetPartW returned 80070057

Microsoft.IE.Manager: CodeBase = http://ControlHostDomain

Microsoft.IE.Manager: Application = path/to/page

Microsoft.IE.Manager: Found a codebase

Microsoft.IE.Manager: UrlCanonicalize returned 0

Microsoft.IE.SecureFactory: URL codeBase: http://ControlHostDomain/

Microsoft.IE.SecureFactory: URL application: path/to/page

Microsoft.IE.SecureFactory: Locating domain for http://ControlHostDomain/

Microsoft.IE.IDKey: Created key

Microsoft.IE.Manager: The domain does not exist.

Microsoft.IE.IDKey: Created key

Microsoft.IE.Manager: The domain does not exist.

Microsoft.IE.SecureFactory: Need to create domain

Microsoft.IE.SecureFactory: Application base: http://ControlHostDomain/

Microsoft.IE.SecureFactory: Private Bin Path: bin

Microsoft.IE.IDKey: Created key

Microsoft.IE.SecureFactory: Trying to create instance of type http://ControlHostDomain/path/to/page/MyControl.dll#MyControl

Microsoft.IE.SecureFactory: Created instance of type http://ControlHostDomain/path/to/page/MyControl.dll::MyControl

If you don't get a log file at all, it is probably because the control assembly could not be downloaded at all.  Check to ensure that the classid property is correct and that your web server is configured to serve .dll files


[연관 글]






[최초 등록일: ]
[최종 수정일: 4/14/2006]


비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  8  [9]  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
975정성태10/9/200810701.NET : 88. ClickOnce에서 .application 파일을 다운로드 하려고 할 때.
974정성태10/8/200810718TFS : 168. MSBuild Extension Pack
973정성태10/5/200812391.NET 3.5 : 42. WPF - Web Browser 및 Splash Control 추가
972정성태10/2/200810659TFS : 167. TFS Power Tools 다음 버전 소개
971정성태9/22/200810992TFS : 166. Index cards and Team System
970정성태9/16/200810972Vista : 53. 설치 디스크를 USB 로 만들기
968정성태9/11/200810587XML Conformance Level 에 Fragment 값이 쓰이는 경우.
967정성태9/8/200810712.NET : 87. CertEnroll 개체를 이용한 인증서 요청/반환/설치
966정성태9/2/200810769.NET : 86. .NET Framework 3.5 SP1 소스 코드 공개
965정성태9/2/200811707Vista : 52. SPI(Stateful Packet Inspection) 옵션 제거
964정성태8/18/200812717.NET 3.0 : 24. WPF DataGrid
969정성태9/16/200810998    답변글 .NET 3.0 : 24.1 Editing Tabular Data in WPF - Building a WPF Grid
963정성태7/25/200811783.NET : 85. VPL(Visual Programming Language)를 아세요?
962정성태7/24/200810843TFS : 165. WorkItem 에 대해 Full Text 검색
961정성태7/20/200810790.NET : 84. WCSF Application Architecture
960정성태7/14/200810618.NET : 83. Non Paged CLR Host
959정성태7/7/200811162.NET : 82. Composite Application Guidance for WPF
958정성태7/7/200812313.NET : 81. C# - 왜 모든 함수호출에서 callvirt 를 사용할까?
957정성태6/30/200811283GUID
956정성태6/27/200810792TFS : 164. 팀 프로젝트 간 WorkItem 이동 방법
955정성태6/26/200811318TFS : 163. 삭제된 항목을 소스 컨트롤 탐색기에서 보이도록 하는 방법
954정성태6/20/200810947Debug : 37. IDE 디자인 모드에서의 디버깅 기법
953정성태6/10/200811788.NET : 80. Unity Application Block 소개(?) [1]
952정성태4/28/200811066.NET : 79. IconHandler 2.0
951정성태4/28/200811483SDK : 14. STA / MTA 기원
950정성태4/24/200810579.NET : 78. Ajax View
1  2  3  4  5  6  7  8  [9]  10  11  12  13  14  15  ...