losing value from session

Discussion in 'ASP .Net' started by Sukh, Jan 3, 2006.

  1. Sukh

    Sukh Guest

    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
     
    Sukh, Jan 3, 2006
    #1
    1. Advertising

  2. Sukh

    Sosh Guest

    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" <> wrote in message
    news:...
    > 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
    >
     
    Sosh, Jan 3, 2006
    #2
    1. Advertising

  3. Sukh

    Sukh Guest

    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
     
    Sukh, Jan 3, 2006
    #3
  4. Sukh

    Sosh Guest

    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" <> wrote in message
    news:...
    > 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
    >
     
    Sosh, Jan 3, 2006
    #4
  5. Sukh

    Marina Guest

    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" <> wrote in message
    news:...
    > 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
    >
     
    Marina, Jan 3, 2006
    #5
  6. Sukh

    Sukh Guest

    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 .
     
    Sukh, Jan 3, 2006
    #6
  7. Sukh

    Marina Guest

    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" <> wrote in message
    news:...
    > 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 .
    >
     
    Marina, Jan 3, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark MacRae

    Re: Session Losing Data

    Mark MacRae, Jul 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    369
    Mark MacRae
    Jul 18, 2003
  2. GFuller

    Losing Session variables

    GFuller, Aug 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    523
    gfuller
    Aug 5, 2003
  3. Nate Spillson

    Session variable losing value

    Nate Spillson, Aug 6, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,165
    Marina
    Aug 6, 2003
  4. Jimmy Junatas

    Losing Session in a Popup Window

    Jimmy Junatas, Aug 27, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    6,149
    Stanley
    Aug 29, 2003
  5. Jason C
    Replies:
    4
    Views:
    696
    Morty Abzug
    Jun 26, 2012
Loading...

Share This Page