Precompile problem...

J

Jay

2.0 asp.net app (precomiled in 2005, not updateable, dll's in bin and
then merged to one dll)...

web app calls a 1.1 (compiled in 2003) webservice initialization
webmethod (works). Second call to a different webmethod (does NOT work.
The second webmethod uses session state (to re-connect individuals
session back together) and crashes...

Hypotheses include: can't use precompiled app in 2005 to call 1.1/2003
websevice that uses state. Jumping across thread pools and state not
possible?

Having trouble attaching to debug into the webservice webmethod.
Stumped. Any ideas/knowledge on what's going on?
 
B

bruce barker \(sqlwork.com\)

if the web service uses cookies to identify session, then you have copy the
session cookie returned from the first request and send to the second.

-- bruce (sqlwork.com)
 
J

Jay

I think I do that...

I found something VERY very interesting...I went to the web.config of
the main application that calls the webservice/webmethod and changed
the pointer from 'machine name' to 'localhost' and both calls to the
webmethod WORKED. This is really wierd. Manually invoking the 2
webservice webmethods worked so it's definitely not the webservice.

I remember in VS 2003 there used to be an option to make the
webreference dynamic. And if you POSTed your project and left it
static, the call to the webmethod would always crash (because it was
pointing to some machine the server couldn't get to - always detectable
in the IIS logs). But that is gone in VS 2005.

This has something to do with the complie process I'm thinking. Ideas?
I'm going on a Google hunt...be back soon hopefully...



*aspnet precompile problem*
 
J

Jay

Still working on this issue. I think it is related to the fact that the
option for web references in VS 2003 to make them dynamic (to read from
the web.config appsettings key) is now gone in VS 2005. When the
webreference points to localhost, it works. If I point it to another
machinename, it does not.
 
J

Jay

The following block of code was causing the problem...

Cookie sessionCookie;
CookieCollection cookieCollection=new CookieCollection();
sessionCookie=(Cookie)Session["sessionCookie"];
cookieCollection=CodingService.CookieContainer.GetCookies(new
Uri("http://localhost"));
if(sessionCookie==null)
{
cookieCollection=CodingService.CookieContainer.GetCookies(new
Uri("http://webstrat02"));
Session["sessionCookie"]=cookieCollection["ASP.NET_SessionId"];
}
else
{
CodingService.CookieContainer.Add(sessionCookie);
}

I was trying to retrieve a cookie that was getting placed on my own
webserver, rather than the other webserver and the session was never
getting re-identified by the cookie because it never existed there...

Is there a reserved parameter for the 'GetCookies' method? Or do I have
to substring/indexof and hack something for that value?

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top