O
omantawy
Hi,
I have some legacy ASP web applications that use an unmanaged COM
component to connect to a third party application. The third part
application has moved to the managed code in the current release with
backward compatibility with the unmanaged code.
In the future releases, the vendor is going to drop backward
compatibility and as a result of that all our legacy ASP applications
will break.
What I am trying to do is:
- Create a managed COM component using the InteropServices that wraps
the new managed components using C# that provides the same interfaces
like the vendors old unmanaged one.
- Use this component in the ASP application instead of the old one to
retrieve the necessary information from the new system and pass it back
to the ASP application.
Unfortunately, this requires accessing the HTTP request sent to the ASP
application from within the .Net component. When I tried to use the
..Net System.Web.HttpContext.Current.Request it gave me an exception
that "Object reference not set to an instance of an object".
My questions are:
- When using the managed COM in the legacy ASP, can I instantiate the
..Net http request within the same context of the unmanaged client?
- How can I construct a .Net http request from the ASP Request object?
Thanks,
Omar
I have some legacy ASP web applications that use an unmanaged COM
component to connect to a third party application. The third part
application has moved to the managed code in the current release with
backward compatibility with the unmanaged code.
In the future releases, the vendor is going to drop backward
compatibility and as a result of that all our legacy ASP applications
will break.
What I am trying to do is:
- Create a managed COM component using the InteropServices that wraps
the new managed components using C# that provides the same interfaces
like the vendors old unmanaged one.
- Use this component in the ASP application instead of the old one to
retrieve the necessary information from the new system and pass it back
to the ASP application.
Unfortunately, this requires accessing the HTTP request sent to the ASP
application from within the .Net component. When I tried to use the
..Net System.Web.HttpContext.Current.Request it gave me an exception
that "Object reference not set to an instance of an object".
My questions are:
- When using the managed COM in the legacy ASP, can I instantiate the
..Net http request within the same context of the unmanaged client?
- How can I construct a .Net http request from the ASP Request object?
Thanks,
Omar