views:

50

answers:

2

i am using vb6 dll in c#.net. It is working properly but when i host it on iis then it shows an error S*ystem.Runtime.InteropServices.COMException: Unable to show modal form within this context*

i am using vb6 dll in following way first register it, then add reference in my project and use it

so tell me how can i solve that problem

+1  A: 

Don't show dialogs or message boxes on a web server. If that error wasn't checked, somebody would have to break into the server room to click the OK button.

Hans Passant
+1  A: 

There is the compiler option "unatteded execution" in vb6 forcing it to suppress message boxes and error messages. Compile it that way and vb6 writes such output to the event log.

Dirk