J
jeremymcnitt
Hi, I looked through the groups, and couldn't find what I was looking
for, and was wondering if anyone here could help me out. I am newish
to ASP.Net and was presented a problem that I don't know how to
resolve.
The problem is I have two websites, each with it's own log in method.
I am trying to make it so that I log into one, it logs into the other.
One site is traditional ASP/VB6, the other is ASP.Net.
I have exposed the login methods from the ASP.Net site and am trying to
call them from the ASP site. I've created an ASP.Net COM component,
which I call from my ASP page. I have successfully created the COM
object, and it's all COM registered.
The COM Component calls the ASP.Net code to write all the correct
cookies, and session variables.
That's where it's not working. I can successfully call the COM object
from the ASP page, I pass in the Response, and the Request Object.
My ASP.Net code needs an HttpContext object.
I have to accept in the COM object the ASP Response, and ASP Request as
Objects. I've tried everything I can think of to get them converted to
ASP.Net HttpRequest and ASP.Net HttpResponse objects.
I would like to do something similar to:
ASP Code:
Dim oOtherSiteInterop
Set oOtherSiteInterop = CreateObject("Interops.OtherSite")
Call oOtherSiteInterop.CreateCookies(Request, Response, sUserID,
sPassword)
COM Code:
public void CreateCookies(object request, object response, string
lName, string lPass)
{
HttpRequest req = (HttpRequest)request;
HttpResponse res = (HttpResponse)response;
HttpContext context = new HttpContext(req, res);
OtherSiteObject bob = new OtherSiteObject();
bob.LoginUser(context, lName, lPass);
}
This isn't working.
Does anyone have a suggestion? Keep in mind before replying that this
may or may not be the best way to do this, but I really need to try to
make this work, before I scrap it and do something that I'm obviously
missing that is more simple.
Thanks much in advance,
Jeremy McNitt
for, and was wondering if anyone here could help me out. I am newish
to ASP.Net and was presented a problem that I don't know how to
resolve.
The problem is I have two websites, each with it's own log in method.
I am trying to make it so that I log into one, it logs into the other.
One site is traditional ASP/VB6, the other is ASP.Net.
I have exposed the login methods from the ASP.Net site and am trying to
call them from the ASP site. I've created an ASP.Net COM component,
which I call from my ASP page. I have successfully created the COM
object, and it's all COM registered.
The COM Component calls the ASP.Net code to write all the correct
cookies, and session variables.
That's where it's not working. I can successfully call the COM object
from the ASP page, I pass in the Response, and the Request Object.
My ASP.Net code needs an HttpContext object.
I have to accept in the COM object the ASP Response, and ASP Request as
Objects. I've tried everything I can think of to get them converted to
ASP.Net HttpRequest and ASP.Net HttpResponse objects.
I would like to do something similar to:
ASP Code:
Dim oOtherSiteInterop
Set oOtherSiteInterop = CreateObject("Interops.OtherSite")
Call oOtherSiteInterop.CreateCookies(Request, Response, sUserID,
sPassword)
COM Code:
public void CreateCookies(object request, object response, string
lName, string lPass)
{
HttpRequest req = (HttpRequest)request;
HttpResponse res = (HttpResponse)response;
HttpContext context = new HttpContext(req, res);
OtherSiteObject bob = new OtherSiteObject();
bob.LoginUser(context, lName, lPass);
}
This isn't working.
Does anyone have a suggestion? Keep in mind before replying that this
may or may not be the best way to do this, but I really need to try to
make this work, before I scrap it and do something that I'm obviously
missing that is more simple.
Thanks much in advance,
Jeremy McNitt