com - System.Runtime.InteropServices.COMException | vb.net -
i know question has been answered many times have tried previous suggested resolution.
1.) target cpu x86
2.) have registered ocx , dll files
the application working fine on old machines (all os) not on new images.
here log :
framework version: v4.0.30319 description: process terminated due unhandled exception. exception info: system.runtime.interopservices.comexception @ system.windows.forms.unsafenativemethods.cocreateinstance(system.guid byref, system.object, int32, system.guid byref) @ system.windows.forms.axhost.createwithlicense(system.string, system.guid) @ system.windows.forms.axhost.createinstancecore(system.guid) @ system.windows.forms.axhost.createinstance() @ system.windows.forms.axhost.getocxcreate() @ system.windows.forms.axhost.transitionupto(int32) @ system.windows.forms.axhost.createhandle() @ system.windows.forms.control.createcontrol(boolean) @ system.windows.forms.control.createcontrol(boolean) @ system.windows.forms.axhost.endinit() @ restaurant.frmmain.initializecomponent() @ restaurant.frmmain..ctor()
exception info: system.invalidoperationexception @ restaurant.my.myproject+myforms.create__instance__[system.__canon, mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089] @ restaurant.frmmain.main()
here how registering files :
c:\windows\microsoft.net\framework\v2.0.50727\caspol -q -machine -addgroup 1 -url file://c:/xyz/* fulltrust -name "v drive"
regsvr32 c:\xyz\crystl32.ocx
regsvr32 c:\xyz\mscomct2.ocx
regsvr32 c:\xyz\msdatgrd.ocx
regsvr32 c:\xyz\cpeaut32.dll
regsvr32 c:\xyz\msstdfmt.dll
crystal reports runtime engine .net 4 framework in installed on system (both x86 , x64).
i had issue once.
i ran visual studio administrator. make sure know setting platform build: anycpu, x86, x64
for x86 try using anycpu!
try debugging issue read article microsoft said can debug exception occurring by:
debug > exceptions... , use find option locate system.runtime.interopservices.comexception. tick option break when it's thrown , debug application.
Comments
Post a Comment