Ask a Question related to ASP.NET General, Design and Development.
-
Colin J Paterson #21
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...credibility.> 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>> >
> > 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
-
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... -
session state ???
Hi, I have following function in a WebService-class : public int Count() { if ( null == Session ) Session = 0; else -
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... -
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... -
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... -
Bob Barrows [MVP] #22
Re: Session State
Colin J Paterson wrote:
No, you cannot lock a thread to a session.> 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
--
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
-
Jeff Dillon #23
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...myself> 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 madeto> credibility.> > 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> > >
> > > 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>> >> > > learn. Learning is my favorite part of living.
> > >
> > > Ray at work
> > >
> > >
> >
>
Jeff Dillon Guest
-
Bob Barrows [MVP] #24
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
-
Colin J Paterson #25
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 "session> store this in a separate process
> for each user", which I do not believe is possible. It implies that> 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
-
Bob Barrows [MVP] #26
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
-
Michael D. Kersey #27
Re: Session State
Colin J Paterson wrote:
I am assuming that you are running some ASP pages and that they will> 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.
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
-
Colin J Paterson #28
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...ignoring> Colin J Paterson wrote:> > The question is, can I store each COM object in a separate process,now I> > 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 thisWindows).>> > 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>
> 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
-
JMMB #29
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
-
christian kuendig #30
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



Reply With Quote

