After searching high and low, and doing quite a bit of research on COM+ and
"Mark Heimonen" <markheimonen@gmail.com> wrote in message
news:eYIwL7VNFHA.3192@TK2MSFTNGP10.phx.gbl...
> Hi, we have a large application framework written in ASP 3.0. We are
> considering the possibility of moving some of our application logic over
> to .NET by exposing c# classes through COM Interop. I was wondering if
> somebody could walk us through the process of accessing the request.form
> and request.querystring intrisic objects on our ASP 3.0 page from within
> our C# class library. We have attempted several different techniques for
> acheiving this goal, but have not found a succesful approach. Here are
> the methods we have attempted:
>
> #1. Using System.web.httpcontext.curren.request: This seemed the most
> obvious, but we kept getting object not set to an instance of an object
>
> #2. Looking at VB6 references, we attempted to emulate the process by
> using Interop.ASPTypeLibrary.dll. This appears to be the correct
> approach, but we could not find a method of directly instantiating the
> ASPTypeLibrary.RequestClass object. It appears that this object needs to
> be pulled from within an existing context.
>
> #3. Next, we found this thread:
>
http://www.dotnet247.com/247reference/msgs/28/144525.aspx, which discusses
> the same subject we were attempting. We are not familiar with
> System.EnterpriseServices, but we attempted to get the process to work by
> using the following code:
>
> public string ReturnFormString()
>
> {
>
> ASPTypeLibrary.RequestClass myTest;
>
> myTest =
> (ASPTypeLibrary.RequestClass)System.EnterpriseServices.ContextUtil.GetNamedProperty("Request");
>
> return myTest.QueryString["test"].ToString();
>
> }
>
> This, unfortunately, returned a specified cast is not valid. Can anybody
> point us in the right direction?
>
> Thanks,
>
> Mark
>
>
>
>
>