C# - Access Session Value During Concurrent Requests

Mar 9, 2010

in one request i am updating session variable. in the other request, i am trying to access that session value, but it was blocked until the first request finish. I am using C# with ASP.NET 2.0 UPDATE: My page code looks like this.

while(int progress = DoWork() && progress <= 100 ){
Session["Progress"] = progress;
}

and my handler just return Session value.

context.Response.Write(Session["progress"].toString());
context.Response.End();

View 1 Replies


Similar Messages:

Web Forms :: Concurrent Requests From Same Session?

Feb 15, 2010

concerning requests being blocked from a main window after a popup window had initiated a file download. Further requests from the same session are being queued until the download is complete. So, is there any way to override this? Is there anyway to tell asp.net to not serialize same session requests? Is there any way to tell asp.net to ignore session for a specific request...httphander(module) or otherwise?

why requests from the same session are being queued until the download is complete. please tell me the funda behind it and how to overcome it.

View 1 Replies

State Management :: Concurrent Access To Session Object

Mar 30, 2010

I am stuck with the issue of concurrent access to Session object. Actually my problem is i m writing to session in frame1 and trying to access that same Session object at the same time in Frame2's Page. I know about the reader/writer lock. I made the enablesessionstate = readonly in the page where i m writing to session. its giving me strange behavior on IE and firefox.

Its working concurrently in IE8 ( means page2 is diplaying modified values while page1 is changing the session object) but does not work in Firefox even page load is not called untill function on page 1 completed. Either anyone can fix my issue with firefox or there is new solution to reader/writer lock so that i can read the session at the same time while writing.

View 2 Replies

WCF / ASMX :: Concurrent Requests WCF + Net.tcp?

Nov 18, 2010

we are using the WCF service and hosted using a console application, now we are using LoadRunner and hitting it concurrently

Where giving 50 hits at a time few requests (26) gets completed successfully and remaining gives error TCP error code 10061: No connection could be made because the target machine actively refused it.

View 1 Replies

MVC :: To Use AsyncController To Allow User Concurrent Ajax Requests?

Jun 10, 2010

In my ASP.NET MVC2 web app I have a page which goes off and gets results from a number of different web service feeds. These return times vary so I want to basically display them as they return after the page loads. I also want my user to be able to kick of requests that can run concurrently with these other requests.

At the minute my page just seems to queue up the requests. The web service calls returning one at a time in the order they are called and then the user can kick of requests.

Is this a case for the asyncController or is there an easier/better way of working this?

View 5 Replies

Web Forms :: Concurrent Requests (Transactions And Concurrency)

Mar 26, 2016

How to control concurrent requests for web sites?

View 1 Replies

MVC's AsyncController Be Used To Service Large Number Of Concurrent Hanging Requests (long Poll)??

Feb 13, 2011

Frameworks like Node.js, Tornado, and Twisted let developers create server-push applications that supports large number of concurrent hanging requests (10k+). From what I understand, they all achieve this by not creating threads to service each hanging request.

Can AsyncController be used to service large number of inactive concurrent requests?If so, are there any reasonably large ASP.NET MVC websites using this approach to create long-poll applications?

View 1 Replies

Web Forms :: Concurrent User Access In An ASP Application

Oct 21, 2010

If multiple users access a web-form at the same time, how can I allow that using my code? Essentially each user reads and writes one variable in the application, and concurrent access is causing problem there.

View 5 Replies

Cache Access In Highly Concurrent Systems

Nov 16, 2010

Suppose I have two threads(Thread1, Thread2) where the threads are accessing the cache for a given object such as in the code below nearly at the same time:

Dim expensiveToGetData = Cache("ExpensiveDataKey")
If ExpensiveToGetData is nothing then
'because the cache has expired
ExpensiveToGetData = LoadExpensiveDataFromDataSource()
Cache("ExpensiveDataKey") = ExpensiveToGetData
end If
ProcessExpensiveData(ExpensiveToGetData)

Isn't it possible for both threads to load the cache because they both requested data from the cache that was nothing/expired? I've run some tests on a local machine and it seems that the cache is being loaded more than once. Is this a normal pattern?

View 2 Replies

C# - ToolkitScriptManager Throws NullReferenceException During Concurrent Access To A Page For The First Time

May 14, 2010

i'm developing a ASP.NET web application which uses the AjaxControlkit 3.0.30512.20315. I have a ToolkitScriptManager instance on my master page which has some ScriptReferences in the CombineScripts collection. If i access my default page from 2 differenct clients after an iisreset, i get the following exception

[NullReferenceException: Object Reference not set to an instance of an object.]
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +143
System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value) +11
AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly) +129
AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry) +148
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +415
System.Web.UI.ScriptManager.RegisterScripts() +191
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +113
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698462
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029

Using .NET Reflector i found out that the GetScriptCombineAttributesmethod access a static dictionary, which is not protected against concurrent access. Either i have a race condition in my code or there is a bug in the AjaxToolkit.

View 2 Replies

Concurrency - SqlConnection Already Open In Case Of Concurrent Access To Same Page

Dec 29, 2010

I have a strange problem in my ASP.Net 3.5 application. When multiple users try to access the same page (which has some long running methods), the application crashes at a point where it tries to open a connection to the database (a static method inside a static class). It appears that the connection is already open. However, this does not happen when there is only one user using the application. What I cannot understand is that how do actions of one user affect the other in a web application?

I double checked that all my open connections are being closed after performing their operation by appending a line of text to a text file whenever a connection is opened or closed. The number of opened and closed connections was equal. Also, the connections are opened and closed from one place only, where the close method is inside a Finally() block.

View 1 Replies

C# - SQlite / Firebird - Support Multiple Concurrent Write Access?

May 19, 2010

I currently store ASP.net application data in XML files. Now the problem is I have asynchronous operations, which means I ran into the problem of simultanous write access on a XML file... Now, I'm considering moving to an embedded database to solve the issue. I'm currently considering SQlite and embeddable Firebird. I'm not sure however if SQlite or Firebird can handle multiple concurrent write access. And I certainly don't want the same problem again. Anybody knows? SQlite certainly is better known, but which one is better - SQlite or Firebird ? I tend to say Firebird, but I don't really know. No MS-Access or MS-SQL-express recommodations please, I'm a sane person.

View 5 Replies

Queues Up All Requests That Use The Same Session ID

Nov 30, 2010

It seems to me that ASP.net queues up all requests that use the same Session ID. Let's say you've got 3 pages. Default.aspx

protected void Page_Load(object sender, EventArgs e)
{
Session["asdf"] = "LOLZ";
}

Hitting this page would obviously create a new session if one doesn't exist.

X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=ibjphuv0aiafqi453tyze345; path=/; HttpOnly

Then you hit Hang.aspx

protected void Page_Load(object sender, EventArgs e)
{
Thread.Sleep(10000);
}

And immediately after you hit any other page that this session ID would be passed to, doesn't matter if it does anything, let's call it Test.aspx. The sequence for loading is like so.

Request Timeline
"GET /" |*|
"GET /Hang.aspx" |******************************************|
"GET /Test.aspx" |**************************************|

I guess my question is how do I disable this feature. I understand it's useful to have so that session state can be more predictable, however in my case a long running reports page load is killing users' ability to multitask.

View 1 Replies

Session.SessionID Changes Between Requests?

May 20, 2010

Why does the property SessionID on the Session-object in an ASP.NET-page change between requests?

I have a page like this:

...
<div>
SessionID: <%= SessionID %>
</div>
...

And the output keeps changing every time I hit F5, independent of browser.

I've seen this work correctly in other projects.

View 2 Replies

Avoid Concurrent Login (logout Former Login Session) In Membership

Jan 8, 2010

I am wondering how I can implement so that later login session logout former login session to avoid concurrent login. I know how to check whether the user is online (by Membership.IsOnline()) and logout the current user (by FormsAuthentication.SignOut()). But I don't know how to logout the previous login session.

View 2 Replies

IIS Configuration :: Browser Hangs When Too Many Requests Due To Session And Need To Start

Mar 10, 2013

I have developed an online exam application in college where we fix the timing for an exam the students conduct there exams at that time. this application is stored in local iis server in the college. i am using inproc session. here there are 200 students writing exam at a time .the problem is the browser stuck after some time and not resopnce unless we restrart the iis on the server. i checked the windows even log .the warning details are listed below. my question is ,is the inproc session is ok for here or i need to use the sql server session or state server session ... 

Log Name: ApplicationSource: ASP.NET 2.0.50727.0Date: 3/10/2013 12:36:52 PM
Event ID: 1309Task Category: Web EventLevel: WarningKeywords: ClassicUser: N/AComputer: ZCW-HV01.zahracol.edu.om
Description:Event code: 3005 Event message: An unhandled exception has occurred.
Event time: 3/10/2013 12:36:52 PM Event time (UTC): 3/10/2013 8:36:52 AM

[Code] ....

View 1 Replies

Redirect All Requests To Www.example.com To Example.com In Config Without Access To IIS?

Aug 23, 2010

'm currently planning to deploy a site with a third party hosting provider. I will only have access to the server via ftp and a tool similar to cpanel called WebsitePanelNo access to IIS set up or configs.Is there anyway to redirect http://www.example.com to http://example.com?

View 3 Replies

SQL Server :: Concurrent Access In SQL Server 2005

Mar 7, 2011

I have a .net web application (framework 2.o) and SQL Server 2005 as my backend. I need to design an application which fetches a particular unique pin number to a customer and then mark this record as used. The problem I face is as the no of concurrent users are more , same pin number is getting allotted to multiple users.

View 3 Replies

Selectively Redirecting HTTP Requests To HTTPS Requests?

Jun 18, 2010

What's the simplest and most effective way to selectively redirect HTTP requests to your ASP.NET page to its HTTPS equivalent? For example, if my page site URL is [URL], I want to redirect some (or all) page requests to [URL] What's the easiest way to do that?

View 2 Replies

Access :: Access/SQL Selectcommand And Session?

Nov 22, 2010

I have the following two pages. One is a search page that have a few listbox/textbox/and dropdownlist. The other will be the result page that take from session those 3 data and using an if/else statement to sort out some detail. After that it will form an access/sql selectcommand to search the database base on that 3 criteria. But for some weird reason only the first part of my if and else statement work. Can anyone check and help me out why the rest of the if/else doesn't work. Or point me to another direction?


---------------------Search.aspx-----------------------------

[Code]....

-------------------SearchResult.aspx-----------------------
[Code]....

[Code]....

View 3 Replies

Concurrent Viewing And Logon ID?

Aug 19, 2010

I am a windows application developer doing a web application with VB.net and SQL 2008 for the first time.I have developed a web application where users are supposed to view a file after selecting from a listbox. I then pick the users logon ID from windows then store in database and produce statistical reports later. It was working fine on my local machine till i deployed it on server to make it accessible on the intranet. The server OS is Windows 2008 Server and runs IIS. My issues are as follows,1. The application is unable to store the user logon id from the client.2. When more than one user uses the application, then there are errors but one user does not produce errors.

View 1 Replies

MVC :: Access The Session On The Controller?

Jan 30, 2010

I am trying to get into grips with AJAX/JQuery and MVC. i need to access the session on the controller. This doesnt seem to be initialised at the constructor level but there needs to be a way I can store items in the session in the constructor depending on the parameter values (an extra constructor is written here) I am also doing unit testing here, which has been provided by 3rd party and they are using this extra constructor.

So the idea here is that when the page is loaded, JQuery will request a collection of items (which will be stored in session) and also be able to post to the page so items are added into the collection too. So, what is the best way here to get access to the session in the constructor of a controller?

View 4 Replies

How To To Access The Session In A WebMethod

Dec 7, 2010

I have a pagemethod defined with the attribute [WebMethod]. The pagemethod accesses the session with no problem (HttpContext.Current.Session).

However I just read somewhere that in order to access the session in a WebMethod, you need to define it like so: [WebMethod(EnableSession=true)]

So my question is, what gives? How come I can access the session even though I dont have that code? Apparently EnableSession defaults to false if its missing, so I should not be able to access the session. The web application uses ASP.NET 3.5 and uses InProc Cookieless sessions.

View 5 Replies

VS 2008 Concurrent Viewing And Logon ID?

Jun 7, 2010

I am a windows application developer doing a web application with VB.net and SQL 2008 for the first time.

I have developed a web application where users are supposed to view a file after selecting from a listbox. I then pick the users logon ID from windows then store in database and produce statistical reports later. It was working fine on my local machine till i deployed it on server to make it accessible on the intranet. The server OS is Windows 2008 Server and runs IIS. My issues are as follows,

1. The application is unable to store the user logon id from the client.
2. When more than one user uses the application, then there are errors but one user does not produce errors.

View 7 Replies

Large Number Of Concurrent Users?

Apr 28, 2010

I am working on a website in which more than a thousand users can login at a time and there may be more than 50000 total users. I am worried about the performance of the application in case of concurrent access.

what is the best way to manage that, so that my application runs without any performance issues.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved