Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > losing value from session

Reply
Thread Tools

losing value from session

 
 
Sukh
Guest
Posts: n/a
 
      01-03-2006
Hi,

I am using ASP.Net with C#. My application is using a control and when
control object is created my application set all the values to that
control. This also contain connection string values. Control add
connection string to session and rest values send to second application
in XML format. Second application does some processing and return back
to control. Here my control have to insert the return data to database
but when I try to access the connection string from session its empty.
Can anyone help me how I can keep the values.

My application is call to second appcation and this second application
is completly seprate application (some jsp/java)

Thanks in advance.

Sukh

 
Reply With Quote
 
 
 
 
Sosh
Guest
Posts: n/a
 
      01-03-2006
Maybe better to keep your connection string in the web.config file. But as
to why your session variables are disappearing - how are you calling the
second application? Could it be that a second session is being created?

"Sukh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
>
> I am using ASP.Net with C#. My application is using a control and when
> control object is created my application set all the values to that
> control. This also contain connection string values. Control add
> connection string to session and rest values send to second application
> in XML format. Second application does some processing and return back
> to control. Here my control have to insert the return data to database
> but when I try to access the connection string from session its empty.
> Can anyone help me how I can keep the values.
>
> My application is call to second appcation and this second application
> is completly seprate application (some jsp/java)
>
> Thanks in advance.
>
> Sukh
>



 
Reply With Quote
 
 
 
 
Sukh
Guest
Posts: n/a
 
      01-03-2006
Hi Sosh,
we are keeping con string in web.config file but when appliction
setting the control values so it set con string values at same time.
second appliction calling usin Response.Redirect ("http..."). its
completely seprate app. and hosted on different server....
I checked its creating second session..
is therea any way to work around...??
Thanks.
Sukh

 
Reply With Quote
 
Sosh
Guest
Posts: n/a
 
      01-03-2006
Hmm. If I understand you correctly:

I take it that the client needs to interact with the JSP app in some way,
and thats why you are using Response.Redirect, if not (and it just needs to
do some extra server side processing or something) then it might be better
to implement the second app as some kind of webservice, and call it from the
code behind in the first app.

If the client does need to interact with the JSP app, then you would somehow
need to pass a session refference to the JSP app, and have it pass it back
in the correct way when its done. Cookieless sessions may help here (where
the session id is part of the URL), you could possibly construct a URL to
pass control back to with the correct session id format - but it sounds a
bit messy. Maybe someone else knows a better way.

Good luck

"Sukh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi Sosh,
> we are keeping con string in web.config file but when appliction
> setting the control values so it set con string values at same time.
> second appliction calling usin Response.Redirect ("http..."). its
> completely seprate app. and hosted on different server....
> I checked its creating second session..
> is therea any way to work around...??
> Thanks.
> Sukh
>



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      01-03-2006
How log is it between when you redirect to the second app and then go back
to the first? It sounds like the first application's session is timing out.

I agree with Sosh's suggestion of converting the second app to a web service
if it has no user interaction component to it.
Otherwise, you might need to increase session timeout, if this is a timing
issue.

"Sukh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
>
> I am using ASP.Net with C#. My application is using a control and when
> control object is created my application set all the values to that
> control. This also contain connection string values. Control add
> connection string to session and rest values send to second application
> in XML format. Second application does some processing and return back
> to control. Here my control have to insert the return data to database
> but when I try to access the connection string from session its empty.
> Can anyone help me how I can keep the values.
>
> My application is call to second appcation and this second application
> is completly seprate application (some jsp/java)
>
> Thanks in advance.
>
> Sukh
>



 
Reply With Quote
 
Sukh
Guest
Posts: n/a
 
      01-03-2006
Hi Marina,
I can't change second appliction coz that's one of our other agency. We
hv to pass some data to them and on the basis to our data they do some
processing and return back to our appl.
Here I am working on a control which is going to use by three differnt
application so I exposing some properties so client application can set
the values.
I wanna to make it configureable.
Its not timeout issue. Actually when application comes back from the
second application it generates new session .

 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      01-03-2006
You still did not say whether the second application has any user
interaction/forms or not, though both myself and Sosh asked.

If it does not require user interaction, you can make an HttpWebRequest to
the second application from the server side code of the first one. This is
essentially like the poor man's web service. You make the request to the
second application to a particular page, it returns a response. You process
the response, and continue on - and you never redirected the user anywhere
at all.

"Sukh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi Marina,
> I can't change second appliction coz that's one of our other agency. We
> hv to pass some data to them and on the basis to our data they do some
> processing and return back to our appl.
> Here I am working on a control which is going to use by three differnt
> application so I exposing some properties so client application can set
> the values.
> I wanna to make it configureable.
> Its not timeout issue. Actually when application comes back from the
> second application it generates new session .
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex losing <br> (different from the earlier topic about losing $1) Jason C Perl Misc 4 06-26-2012 10:29 PM
Losing Drives - Finding Drives - Losing Drives mel@no.spam.com Computer Support 2 09-21-2007 10:16 PM
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
Session variable losing value Nate Spillson ASP .Net 2 08-06-2003 05:46 PM



Advertisments