views:

203

answers:

1

I have a UserControl (.dll) that is embedded via the object tag in a asp.net page, normally the control loads fine but when it does not it only shows a blank page with a icon in the top left corner. Is there any way to trap any errors or view any error messages during the loading of the UserControl? The visual studio 2008 debugger does not seem to be able to help out in this case.

/Daniel

+1  A: 

Have you attached the debugger to the iexplore.exe process? Does your dll get loaded? (Modules window in VS when debugging.)

You can enable logging for the loading of a .net control in IE: http://support.microsoft.com/kb/313892

You can enable fusion logging to see if there are any further issues with dependant assemblies: htREMOVETHIStp://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx, httREMOVETHISp://msdn.microsoft.com/en-us/library/e74a18c4%28VS.71%29.aspx

Issues I've had:

  • Be sure that all the needed assemblies are in the right directories. You can use a tool like Fiddler to see what is requested by IE. httREMOVETHISp://www.fiddler2.com/fiddler2/
  • Often the default permissions are not enough, embedded .net controls in IE run under restricted permissions. You have to use caspol to give more permissions: httREMOVETHISp://stackoverflow.com/questions/1050574/caspol-fulltrust-and-running-an-activex-control-in-ie-with-fulltrust-based-on-ur Look out for SecurityExceptions.
  • Look out for old versions hanging around in the download cache (gacutil /ldl and gacutil /cdl on the command line), and in the Temporary Internet Files. It is best to clear both if the embedded control doesn't work.

Good luck. (You're gonna need it...)

Sorry about the REMOVETHIS, SO complained about the links.

alwin