losing value from session

S

Sukh

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
 
S

Sosh

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?
 
S

Sukh

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
 
S

Sosh

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
 
M

Marina

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.
 
S

Sukh

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 .
 
M

Marina

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.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top