Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Debugging Security exceptions
 

Debugging Security exceptions

I'm looking for more tools to debug winforms apps deployed to IE.

I have a winforms control embedded in an html page with an object tag.  It often fails to load for no apparent reason.  My solution consists of two dll's (SimpleControl and otherlib).  Otherlib is statically linked to SimpleControl.dll.  The application (SimpleControl.dll, Otherlib.dll, SimpleControl.config, index.html) have been put into an IIS virtual directory SimpleControl.  Both dll's are strongly signed and the SimpleControl.dll has its AllowPartiallyTrustedCallers attribute set.

Sometimes when I deploy the application the control doesn't load, I just get an empty slot where the control should've been.  I suspect in most cases it's a security exception, but how can I tell?  I set System.Diagnostics.Debugger.Break() call to attach the debugger, it doesn't get hit.

My IIS log shows:
18:51:08 127.0.0.1 GET /SimpleControl/index.htm 200
18:51:08 127.0.0.1 GET /SimpleControl/SimpleControl.dll 200
18:51:08 127.0.0.1 GET /SimpleControl/SimpleControl.config 200

critically otherlib.dll wasn't requested

Fuslogvw doesn't show any binding failures.  If I set fuslogvw to log all activity (via regkey HKLM\Software\Microsoft\Fusion\ForceLog registry value to 1 (the value is a DWORD)), all I can see is that it didn't attempt to bind otherlib.

Are there any log files I'm missing?  Is there some way to get IE/the CLR to log more of whats going on?  

If there is no better tool at the moment, would Microsoft considering adding something?

Thanks
Mark -- in the security exception abyss

In this case the problem turned out to be a Security exception - I invoked AppDomain.GetCurrentThreadId() - which isn't documented to have an exception
MigrationUser 1  Thursday, February 13, 2003 4:11 PM
Have a look at this article - perhaps this may help?

http://support.microsoft.com/default.aspx?scid=kb;en-us;313892

Jessica
MigrationUser 1  Wednesday, February 19, 2003 12:11 AM
Sweet, I think you've nailed it,  which beats all my contacts at MS, who've missed this so far.

Thanks
Mark
MigrationUser 1  Wednesday, February 19, 2003 11:57 AM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce + You are not allowed to put files into an executable folder on this server (Visual Studio Team System 2005)
• C# project published with ClickOnce adds <file> entry for COM dll with embedded manifest instead of depending on the manifest
• Click Once Update and Site Minder
• install msi file with setup
• Two Installs, Same Program
• ClickOnce: IE opens .application as XML file
• Setup project files
• Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
• Problem in silent installation
• Window Application startup position minimized