![]() |
|
|
|
#1 |
|
I've a dotNet web application that works fine when there's only one
user on it. When there's more than one user, it starts to act weird. I'm not using application variable, just session variable and one worker process. First I suspect there might be a cross-over session sharing, but after more tests that doesn't seem to be the case. The problem as I can tell seem to be one user requesting a page by clicking on a link while another user requesting a different page also by clicking on a different link. One user gets to her page while the other user gets to the wrong page. I'm using Response.Redirect on the code behind through the link button click event. This doesn't happen at all when there's only one user on it. I'm running out of idea testing this. Any suggestions welcome, thanks! Joe |
|
|
|
|
#2 |
|
Posts: n/a
|
Are you using any shared/static methods, properties, etc. Those are not
thread-safe (depending on how you implement and use, of course). So for example if you stored the URL of next page in a property that was static, depending on timing of who sets the variable first, who uses it when, the users could end up seeing 'shared behavior'.... Otherwise we might need to see more code snippets.... -- -craig MVP - ASP/ASP.NET "Joe" wrote: > I've a dotNet web application that works fine when there's only one > user on it. When there's more than one user, it starts to act weird. > I'm not using application variable, just session variable and one > worker process. First I suspect there might be a cross-over session > sharing, but after more tests that doesn't seem to be the case. > > The problem as I can tell seem to be one user requesting a page by > clicking on a link while another user requesting a different page also > by clicking on a different link. One user gets to her page while the > other user gets to the wrong page. I'm using Response.Redirect on the > code behind through the link button click event. This doesn't happen at > all when there's only one user on it. I'm running out of idea testing > this. Any suggestions welcome, thanks! > > =?Utf-8?B?Q3JhaWcgRGVlbHNueWRlcg==?= |
|
|
|
#3 |
|
Posts: n/a
|
That was it! One of the variable was declared as Public Shared and I
guess that it acts like an Application variable. But one question what is the difference between a Public Shared vs Private Shared and Public Shared vs Public. Thank you! Joe |
|
|
|
#4 |
|
Posts: n/a
|
shared means the variable is "shared" between all threads (the variable is
actually part of the class, not the class instance). public means the variable can be accessed from outside the class. private means the variable can only be access from within the class. so public shared i as int 'can be access from any class or module in the application private shared i as int 'can only be accessed from the defining class in both cases the value is the same from any thread. -- bruce (sqlwork.com) "Joe" <> wrote in message news: oups.com... > That was it! One of the variable was declared as Public Shared and I > guess that it acts like an Application variable. > > But one question what is the difference between a Public Shared vs > Private Shared > and Public Shared vs Public. > > Thank you! > Bruce Barker |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| possible maximum number of users in .NET application in lan and wan networks | zinabudar | Software | 0 | 11-07-2006 07:54 AM |
| New releases: World Trade Center, Jackass Number Two & Wicker Man: Updated complete downloadable R1 DVD DB & info lists | Doug MacLean | DVD Video | 0 | 10-24-2006 06:04 AM |
| This is incredible! | jc_ice | DVD Video | 1 | 08-13-2006 10:47 AM |
| Re: 38,000 U.S. KILLED & WOUNDED IN IRAQ & dvd's | JA | DVD Video | 0 | 03-06-2005 01:16 AM |
| [liveupdate] Digest Number 47 | Ablang | DVD Video | 0 | 08-14-2004 03:29 AM |