Hi,
I have created a asp.net online booking service for a client using n
tier logic producing the follwing dll's:
[Individual projects]
bookings_business.dll
bookings_config.dll
bookings_data.dll
[asp.net web project]
bookings.dll
The client requires a COM interface into the business methods, to allow
server sided programs to access the data.
I have wrapped the business calls via a interface class
(as shown here: http://www.csharphelp.com/archives/archive281.html ),
which is now a separate class in the bookings_business.dll.
bookings_business.dll was registered via using global assembly cache
util & regasm:
(gacutil -I BookingsBusiness.dll
Regasm BookingsBusiness.dll
/tlb:BookingsBusiness.tlb
)
The COM dll appears in windows/assembly directory & Oleview.exe can be
used to view the interface. (but NOT create the instance).
The problem is that the business logic cannot seem to successfully call
the methods in the data & config dll's. The config dll uses asp.net's
context.Cache to get a string out of the web.config file.
I have set web.config's <identity impersonate="true"/>.
When a new instance is created using the VC++ client or oleview a
exception is generated (IClassFactory: CreateInstance Failed). However
if I remove the call to a config or data dll call, the instance is good
in both VC++ client & oleview. This proves the only problem seems to be
accessing the referenced non COM enabled
dll's.
Can someone please explain how this scenario can be successfully
implemented. Can asp.net's runtime be made to operate as if a session
has been made to start from a web service or .aspx pageload, even
though it hasn't & does anyone have a worked example.
Thanyou in advance.
David Pendry.