G
Guest
Hi,
I built a COM object in VB .NET 2003 but can't find a way for the COM
object to determine its executing location. The COM object requires some
configuration and the COM object must find the configuration file, with will
be in the same folder as the DLL, but without hard coding the path. The COM
object will be called from ASP.
Below are the two solutions I've tried but each triggers an error when
called from ASP.
1. Doing a Registry search of HKEY_CLASSES_ROOT for the COM object's CLSID
to get the BaseCode value but Registry access is prohibited.
2. Defining an Assembly object to get the CodeBase property:
Dim ThisAssembly As [Assembly] = _
System.Reflection.Assembly.GetExecutingAssembly
but it causes "An exception type 'mscorlib: URI formats are not supported' "
Thank you for whatever help you provide,
Scott
I built a COM object in VB .NET 2003 but can't find a way for the COM
object to determine its executing location. The COM object requires some
configuration and the COM object must find the configuration file, with will
be in the same folder as the DLL, but without hard coding the path. The COM
object will be called from ASP.
Below are the two solutions I've tried but each triggers an error when
called from ASP.
1. Doing a Registry search of HKEY_CLASSES_ROOT for the COM object's CLSID
to get the BaseCode value but Registry access is prohibited.
2. Defining an Assembly object to get the CodeBase property:
Dim ThisAssembly As [Assembly] = _
System.Reflection.Assembly.GetExecutingAssembly
but it causes "An exception type 'mscorlib: URI formats are not supported' "
Thank you for whatever help you provide,
Scott