Microsoft MVP성태의 닷넷 이야기
스마트 클라이언트 - Diagnosing Control in browser issues [링크 복사], [링크+제목 복사],
조회: 10984
글쓴 사람
정성태 (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)
1001정성태12/31/200810192.NET : 95. 빌드된 어셈블리를 서명하는 방법 [1]
1000정성태12/29/200810286Code Contracts
999정성태12/17/200811201Visual C++ : 14. Visual Studio 2010 - MSBuild
998정성태12/16/200812021.NET 3.0 : 26. WPF - HostVisual?
997정성태12/10/200811887.NET : 94. Native C++ 클래스를 상속받는 C# 클래스 정의
996정성태12/9/200812276.NET : 93. Document Reflector [1]
995정성태12/1/200811851Visual C++ : 13. Detours 라이브러리
993정성태11/30/200811792.NET 3.0 : 25. C# Extension 의 좋은 활용 예 - 오피스 Interop API Extensions
992정성태11/30/200816875.NET : 92. Application.DoEvents 의 부작용
991정성태11/26/200813964.NET 4.0: 6. Thread Pool 개선
990정성태11/25/200811567개발 환경 구성: 124. Hyper-V 와 도메인 컨트롤러
989정성태11/21/200811070IIS : 24. IIS7 - Process and Thread Identity in ASP.NET
988정성태11/9/200811317.NET 4.0: 5. C# 4.0 새기능들(2008년10월CTP버젼)
987정성태11/5/200811604.NET 4.0: 4. What's New in the BCL in .NET 4.0 [2]
986정성태11/3/200810862.NET 4.0: 3. Dump 디버깅 지원
985정성태10/30/200810557.NET 4.0: 2. .NET 4.0 포스터
984정성태10/30/200810916.NET 4.0: 1. No PIA
983정성태10/29/200810863Visual C++ : 12. Visual C++ 10
982정성태10/29/200812216.NET : 91. WPF Toolkit
981정성태10/27/200811258.NET : 90. Microsoft Chart control for .NET Framework
980정성태10/24/200811085Debug : 38. StackOverflow Notifier
979정성태10/24/200810683SDK : 15. ESENT (Extensible Storage Engine) API in the Windows SDK
978정성태10/23/200810990TFS : 170. TeamReview 도구
977정성태10/15/200813078.NET : 89. DotNetZip - ZIP 압축을 위한 닷넷 라이브러리
976정성태10/15/200810762TFS : 169. tf.exe 명령어 - workspaces /remove 와 workspaces /delete 의 차이
975정성태10/9/200810701.NET : 88. ClickOnce에서 .application 파일을 다운로드 하려고 할 때.
1  2  3  4  5  6  7  [8]  9  10  11  12  13  14  15  ...