Microsoft MVP성태의 닷넷 이야기
스마트 클라이언트 - Diagnosing Control in browser issues [링크 복사], [링크+제목 복사],
조회: 10986
글쓴 사람
정성태 (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)
1026정성태2/4/200910729TFS : 171. Increment your Assembly Versions using Team Build
1025정성태2/3/200910872Debug : 39. Windows 7 에서 동작하는 ADPlus
1024정성태2/1/200910178VS.NET IDE : 44. Project Template for TFS Utilities
1023정성태1/30/200910737SDK : 16. MsiQueryProductState API
1022정성태1/29/200910459.NET : 98. Pex
1021정성태1/27/200910226Windows 2008 : 8. Active Directory Recycle Bin
1020정성태1/23/200910563IIS : 27. IIS 6 환경에서 AppPool 사용 관리
1019정성태1/23/200910318.NET : 97. COM 개체 사용시 주의점
1018정성태1/23/200910587VS.NET IDE : 43. 새 프로젝트 대화창에서 프로젝트 템플릿이 없을 때 - DevEnv /InstallVSTemplates
1017정성태1/21/200910359.NET 4.0: 7. Workflow Foundation 3.0/3.5와 4.0의 호환에 관해서.
1016정성태1/20/200912246.NET 3.0 : 29. WPF - HWND를 가진 윈도우 투명 처리
1015정성태1/18/200910121Web : 2. Azure 서비스 맛보기 예제
1014정성태1/17/200912814Vista : 54. WinRM(Windows Remote Management)
1013정성태1/17/200910335Windows 7: 2. VS.NET 2008을 64비트 Windows 7 베타에 설치 불가
1012정성태1/15/200910649.NET 3.0 : 28. WPF - Dependency Object 를 Console 응용 프로그램에서 다루기
1011정성태1/13/20099850IIS : 26. 파일 공유를 통한 Configuration 공유 방법 개선
1010정성태1/13/200910596Windows 7: 1. BitLocker - USB 드라이브 지원
1009정성태1/12/200910507IIS : 25. ConfigurationEditor - .config 변경에 대한 코드 생성기
1008정성태1/10/200911402IE 8 User Agent 문자열
1007정성태1/10/200917024.NET 3.0 : 27. WPF - 폴더 선택 대화창 (FolderBrowserDialog) [4]
1006정성태1/7/200910667.NET : 96. C# Interpreter
1005정성태1/4/200911220MPI 를 사용한 첫 응용 프로그램 소개
1004정성태1/3/200910739개발 환경 구성: 125. PowerShell - 동적으로 C# 응용 프로그램 빌드 [1]
1003정성태1/1/2009144252008년 인기 순위 정리
1002정성태12/31/200810501Software Release Management - The Questionnaire
1001정성태12/31/200810192.NET : 95. 빌드된 어셈블리를 서명하는 방법 [1]
1  2  3  4  5  6  [7]  8  9  10  11  12  13  14  15  ...