By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,706 Members | 1,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,706 IT Pros & Developers. It's quick & easy.

losing value from session

P: n/a
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

Jan 3 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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" <su*********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro 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

Jan 3 '06 #2

P: n/a
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

Jan 3 '06 #3

P: n/a
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" <su*********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr 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

Jan 3 '06 #4

P: n/a
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" <su*********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro 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

Jan 3 '06 #5

P: n/a
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 .

Jan 3 '06 #6

P: n/a
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" <su*********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr 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 .

Jan 3 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.