Ask a Question related to ASP.NET General, Design and Development.

  1. #21

    Default Re: Session State

    Look

    Point 1) I don't care if it is scaleable, can I do it?
    Point 2) The rest of the thread is pointless.

    "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
    news:Oxf3T5syEHA.1260@TK2MSFTNGP12.phx.gbl...
    > Sure, when I'm wrong, I'll admit it right away. Except when I made myself
    > perfectly clear and someone wants attention by arguing in semantics.
    >
    > You should not store binary objects in Session. Only base types like
    > integers and strings.
    >
    > Jeff
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > message news:u5Cqa$PyEHA.1188@tk2msftngp13.phx.gbl...
    > >
    > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
    > > news:eGftZhPyEHA.1564@TK2MSFTNGP09.phx.gbl...
    > > >> When people point out my mistakes, I admit them, as
    > > > hard as it is on my flesh to do so, in order to maintain my
    credibility.
    > >
    > > Bravo Kevin! I like it when people point out my mistakes, personally,
    > > because it reminds me that there is still an infinite amount of stuff to
    > > learn. Learning is my favorite part of living.
    > >
    > > Ray at work
    > >
    > >
    >
    >

    Colin J Paterson Guest

  2. Similar Questions and Discussions

    1. Session state IIS (Machine Key | Load Balanced Session)
      This is a classic ASP group. Try microsoft.public.dotnet.framework.aspnet "Fred" <me@me.com> wrote in message...
    2. session state ???
      Hi, I have following function in a WebService-class : public int Count() { if ( null == Session ) Session = 0; else
    3. Using a SQL DB for session state.
      I have encountered a problem when I restart a SQL server I lose my session variables for ASP.NET It seems that the Temp table cannot be used...
    4. Asp Session state ??
      I'm pretty new to asp. It seems that I am assigning to the session rather than comparing against. I want to compare it in the first peice of code...
    5. Session state...
      Why are you calling a webservice that is within the same app. Shouldn't the web service be on a different server or at least be a different IIS...
  3. #22

    Default Re: Session State

    Colin J Paterson wrote:
    > Is it possible to store session state for each separate user in a
    > separate process? We have a COM component that we want to use that is
    > not thread safe and has to be isolated. We would like to store this
    > in a separate process for each user.
    >
    > Thanks for any help
    No, you cannot lock a thread to a session.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows [MVP] Guest

  4. #23

    Default Re: Session State

    Yes, you can do it. You'll just be doing it wrong.

    Jeff

    "Colin J Paterson" <memexmsdn@memex.com> wrote in message
    news:OVEiZnwyEHA.1192@tk2msftngp13.phx.gbl...
    > Look
    >
    > Point 1) I don't care if it is scaleable, can I do it?
    > Point 2) The rest of the thread is pointless.
    >
    > "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
    > news:Oxf3T5syEHA.1260@TK2MSFTNGP12.phx.gbl...
    > > Sure, when I'm wrong, I'll admit it right away. Except when I made
    myself
    > > perfectly clear and someone wants attention by arguing in semantics.
    > >
    > > You should not store binary objects in Session. Only base types like
    > > integers and strings.
    > >
    > > Jeff
    > >
    > > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > > message news:u5Cqa$PyEHA.1188@tk2msftngp13.phx.gbl...
    > > >
    > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
    > > > news:eGftZhPyEHA.1564@TK2MSFTNGP09.phx.gbl...
    > > > >> When people point out my mistakes, I admit them, as
    > > > > hard as it is on my flesh to do so, in order to maintain my
    > credibility.
    > > >
    > > > Bravo Kevin! I like it when people point out my mistakes, personally,
    > > > because it reminds me that there is still an infinite amount of stuff
    to
    > > > learn. Learning is my favorite part of living.
    > > >
    > > > Ray at work
    > > >
    > > >
    > >
    > >
    >
    >

    Jeff Dillon Guest

  5. #24

    Default Re: Session State

    I think you're answering the wrong question. The primary question was " ...
    store this in a separate process
    for each user", which I do not believe is possible. It implies that session
    variables for each user are stored/run in different threads/processes
    specific to that user. This is just not the case.

    Bob Barrows


    Jeff Dillon wrote:
    > Yes, you can do it. You'll just be doing it wrong.
    >
    > Jeff
    >
    > "Colin J Paterson" <memexmsdn@memex.com> wrote in message
    > news:OVEiZnwyEHA.1192@tk2msftngp13.phx.gbl...
    >> Look
    >>
    >> Point 1) I don't care if it is scaleable, can I do it?
    >> Point 2) The rest of the thread is pointless.
    >>
    >> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
    >> news:Oxf3T5syEHA.1260@TK2MSFTNGP12.phx.gbl...
    >>> Sure, when I'm wrong, I'll admit it right away. Except when I made
    >>> myself perfectly clear and someone wants attention by arguing in
    >>> semantics.
    >>>
    >>> You should not store binary objects in Session. Only base types
    >>> like integers and strings.
    >>>
    >>> Jeff
    >>>
    >>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>
    >>> wrote in message news:u5Cqa$PyEHA.1188@tk2msftngp13.phx.gbl...
    >>>>
    >>>> "Kevin Spencer" <kspencer@takempis.com> wrote in message
    >>>> news:eGftZhPyEHA.1564@TK2MSFTNGP09.phx.gbl...
    >>>>>> When people point out my mistakes, I admit them, as
    >>>>> hard as it is on my flesh to do so, in order to maintain my
    >>>>> credibility.
    >>>>
    >>>> Bravo Kevin! I like it when people point out my mistakes,
    >>>> personally, because it reminds me that there is still an infinite
    >>>> amount of stuff to learn. Learning is my favorite part of living.
    >>>>
    >>>> Ray at work
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows [MVP] Guest

  6. #25

    Default Re: Session State

    The question is, can I store each COM object in a separate process, ignoring
    anything to do with what I should be doing. Can I do it?

    We are resigning ourselves to writing a PERL daemon that will do this now I
    think as IIS just won't allow us to.

    "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:epa0pDzyEHA.908@TK2MSFTNGP11.phx.gbl...
    > I think you're answering the wrong question. The primary question was "
    ....
    > store this in a separate process
    > for each user", which I do not believe is possible. It implies that
    session
    > variables for each user are stored/run in different threads/processes
    > specific to that user. This is just not the case.
    >
    > Bob Barrows
    >
    >
    > Jeff Dillon wrote:
    > > Yes, you can do it. You'll just be doing it wrong.
    > >
    > > Jeff
    > >
    > > "Colin J Paterson" <memexmsdn@memex.com> wrote in message
    > > news:OVEiZnwyEHA.1192@tk2msftngp13.phx.gbl...
    > >> Look
    > >>
    > >> Point 1) I don't care if it is scaleable, can I do it?
    > >> Point 2) The rest of the thread is pointless.
    > >>
    > >> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
    > >> news:Oxf3T5syEHA.1260@TK2MSFTNGP12.phx.gbl...
    > >>> Sure, when I'm wrong, I'll admit it right away. Except when I made
    > >>> myself perfectly clear and someone wants attention by arguing in
    > >>> semantics.
    > >>>
    > >>> You should not store binary objects in Session. Only base types
    > >>> like integers and strings.
    > >>>
    > >>> Jeff
    > >>>
    > >>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>
    > >>> wrote in message news:u5Cqa$PyEHA.1188@tk2msftngp13.phx.gbl...
    > >>>>
    > >>>> "Kevin Spencer" <kspencer@takempis.com> wrote in message
    > >>>> news:eGftZhPyEHA.1564@TK2MSFTNGP09.phx.gbl...
    > >>>>>> When people point out my mistakes, I admit them, as
    > >>>>> hard as it is on my flesh to do so, in order to maintain my
    > >>>>> credibility.
    > >>>>
    > >>>> Bravo Kevin! I like it when people point out my mistakes,
    > >>>> personally, because it reminds me that there is still an infinite
    > >>>> amount of stuff to learn. Learning is my favorite part of living.
    > >>>>
    > >>>> Ray at work
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >

    Colin J Paterson Guest

  7. #26

    Default Re: Session State

    You may be able to, but i do not believe you could tie that process to a
    particular session or user.

    Bob Barrows
    Colin J Paterson wrote:
    > The question is, can I store each COM object in a separate process,
    > ignoring anything to do with what I should be doing. Can I do it?
    >
    > We are resigning ourselves to writing a PERL daemon that will do this
    > now I think as IIS just won't allow us to.
    >
    > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    > news:epa0pDzyEHA.908@TK2MSFTNGP11.phx.gbl...
    >> I think you're answering the wrong question. The primary question
    >> was " ... store this in a separate process
    >> for each user", which I do not believe is possible. It implies that
    >> session variables for each user are stored/run in different
    >> threads/processes specific to that user. This is just not the case.
    >>
    >> Bob Barrows
    >>
    >>
    >> Jeff Dillon wrote:
    >>> Yes, you can do it. You'll just be doing it wrong.
    >>>
    >>> Jeff
    >>>
    >>> "Colin J Paterson" <memexmsdn@memex.com> wrote in message
    >>> news:OVEiZnwyEHA.1192@tk2msftngp13.phx.gbl...
    >>>> Look
    >>>>
    >>>> Point 1) I don't care if it is scaleable, can I do it?
    >>>> Point 2) The rest of the thread is pointless.
    >>>>
    >>>> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
    >>>> news:Oxf3T5syEHA.1260@TK2MSFTNGP12.phx.gbl...
    >>>>> Sure, when I'm wrong, I'll admit it right away. Except when I made
    >>>>> myself perfectly clear and someone wants attention by arguing in
    >>>>> semantics.
    >>>>>
    >>>>> You should not store binary objects in Session. Only base types
    >>>>> like integers and strings.
    >>>>>
    >>>>> Jeff
    >>>>>
    >>>>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>
    >>>>> wrote in message news:u5Cqa$PyEHA.1188@tk2msftngp13.phx.gbl...
    >>>>>>
    >>>>>> "Kevin Spencer" <kspencer@takempis.com> wrote in message
    >>>>>> news:eGftZhPyEHA.1564@TK2MSFTNGP09.phx.gbl...
    >>>>>>>> When people point out my mistakes, I admit them, as
    >>>>>>> hard as it is on my flesh to do so, in order to maintain my
    >>>>>>> credibility.
    >>>>>>
    >>>>>> Bravo Kevin! I like it when people point out my mistakes,
    >>>>>> personally, because it reminds me that there is still an infinite
    >>>>>> amount of stuff to learn. Learning is my favorite part of
    >>>>>> living.
    >>>>>>
    >>>>>> Ray at work
    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows [MVP] Guest

  8. #27

    Default Re: Session State

    Colin J Paterson wrote:
    > The question is, can I store each COM object in a separate process, ignoring
    > anything to do with what I should be doing. Can I do it?
    >
    > We are resigning ourselves to writing a PERL daemon that will do this now I
    > think as IIS just won't allow us to.
    I am assuming that you are running some ASP pages and that they will
    communicate (pass data to/from) the appropriate "COM object in a
    separate process" using some form of Inter-Process Communication(IPC).

    Assuming the above is correct, then you can communicate with a
    particular process (one representing a particular user) using TCP/IP
    sockets, named pipes, DDE or file/stream I/O (there are other methods,
    e.g., shared-memory configurations, but I haven't used them under Windows).

    Easy way: assign unique port numbers (e.g., 127.0.0.1:8080,
    127.0.0.1:8081, 127.0.0.1:8082, etc.) to each user and, on system
    startup, start a separate resident TCP/IP (or easier, HTTP listener
    process for each user. When a listener receives a request it
    authenticates the request, processes it using the COM component and
    returns a result. If the listener doesn't respond within an appropriate
    time, a timeout should occur and appropriate action taken. The ASP page
    could use the ServerXMLHTTP object to send a request to the appropriate
    listener and fetch the response.

    As an aside, note that what you describe is a "Web Service" (roughly, a
    function call performed over a network) so under some circumstances you
    _might_ want to look at the tools (e.g., Visual Studio, Perl SOAP
    [url]http://search.cpan.org/search?query=SOAP&mode=all[/url] ) you have available
    for turning your component into a formal Web Service (although I don't
    recommend that initially since it may introduce some unwelcome and
    unnecessary complexity).

    Good Luck,
    Michael D. Kersey
    Michael D. Kersey Guest

  9. #28

    Default Re: Session State

    What we are writing is a Web Service but it still has the same problems as
    it is hosted under IIS. The method you describe is similar to the one we
    have used in the past but it is a pain in the ass and we thought we might
    revisit it under ASP.NET as the old system worked under old ASP (as a web
    application). We are going to use the named pipe solution under PERL it
    seems although I was hoping we could use .NET as it is much nicer
    technology.

    "Michael D. Kersey" <mdkersey@hal-pc.org> wrote in message
    news:u6YhD1$yEHA.1260@TK2MSFTNGP12.phx.gbl...
    > Colin J Paterson wrote:
    > > The question is, can I store each COM object in a separate process,
    ignoring
    > > anything to do with what I should be doing. Can I do it?
    > >
    > > We are resigning ourselves to writing a PERL daemon that will do this
    now I
    > > think as IIS just won't allow us to.
    >
    > I am assuming that you are running some ASP pages and that they will
    > communicate (pass data to/from) the appropriate "COM object in a
    > separate process" using some form of Inter-Process Communication(IPC).
    >
    > Assuming the above is correct, then you can communicate with a
    > particular process (one representing a particular user) using TCP/IP
    > sockets, named pipes, DDE or file/stream I/O (there are other methods,
    > e.g., shared-memory configurations, but I haven't used them under
    Windows).
    >
    > Easy way: assign unique port numbers (e.g., 127.0.0.1:8080,
    > 127.0.0.1:8081, 127.0.0.1:8082, etc.) to each user and, on system
    > startup, start a separate resident TCP/IP (or easier, HTTP listener
    > process for each user. When a listener receives a request it
    > authenticates the request, processes it using the COM component and
    > returns a result. If the listener doesn't respond within an appropriate
    > time, a timeout should occur and appropriate action taken. The ASP page
    > could use the ServerXMLHTTP object to send a request to the appropriate
    > listener and fetch the response.
    >
    > As an aside, note that what you describe is a "Web Service" (roughly, a
    > function call performed over a network) so under some circumstances you
    > _might_ want to look at the tools (e.g., Visual Studio, Perl SOAP
    > [url]http://search.cpan.org/search?query=SOAP&mode=all[/url] ) you have available
    > for turning your component into a formal Web Service (although I don't
    > recommend that initially since it may introduce some unwelcome and
    > unnecessary complexity).
    >
    > Good Luck,
    > Michael D. Kersey

    Colin J Paterson Guest

  10. #29

    Default Session state

    The following code works fine when testing with the help web page, but it
    doesn't work when running from the client application. Anybody knows what
    could be the problem here? thanks a lot.
    JMMB

    [WebMethod(EnableSession=true)]
    public string CreateSession()
    {
    Session["nome"] = "Marcelo";
    return Session["nome"].ToString();
    }

    [WebMethod(EnableSession=true)]
    public string ReadSession()
    {
    if(Session["nome"] != null)
    return Session["nome"].ToString();
    else
    return "expired";
    }

    [WebMethod(EnableSession=true)]
    public void AbandonSession()
    {
    Session.Abandon();
    }

    JMMB Guest

  11. #30

    Default Re: Session state

    hmm...
    you're client doesn't accept a cookie and therefore has no session?
    try tracking the http stream with htpp analyzer or some other network snifer

    "JMMB" <JMMB@discussions.microsoft.com> schrieb im Newsbeitrag
    news:24FB2A0B-AA11-4C97-8965-AF634751A3E4@microsoft.com...
    > The following code works fine when testing with the help web page, but it
    > doesn't work when running from the client application. Anybody knows what
    > could be the problem here? thanks a lot.
    > JMMB
    >
    > [WebMethod(EnableSession=true)]
    > public string CreateSession()
    > {
    > Session["nome"] = "Marcelo";
    > return Session["nome"].ToString();
    > }
    >
    > [WebMethod(EnableSession=true)]
    > public string ReadSession()
    > {
    > if(Session["nome"] != null)
    > return Session["nome"].ToString();
    > else
    > return "expired";
    > }
    >
    > [WebMethod(EnableSession=true)]
    > public void AbandonSession()
    > {
    > Session.Abandon();
    > }
    >

    christian kuendig Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139