Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - number of users

 
Thread Tools Search this Thread
Old 08-24-2005, 05:32 PM   #1
Default number of users


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
  Reply With Quote
Old 08-24-2005, 06:26 PM   #2
=?Utf-8?B?Q3JhaWcgRGVlbHNueWRlcg==?=
 
Posts: n/a
Default RE: number of users
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==?=
  Reply With Quote
Old 08-24-2005, 09:44 PM   #3
Joe
 
Posts: n/a
Default Re: number of users
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
  Reply With Quote
Old 08-25-2005, 01:10 AM   #4
Bruce Barker
 
Posts: n/a
Default Re: number of users
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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