I have checked the servers (Win Server 2003) application event logs for the following problem [URL] which doesn't show up. It just appears that sessions drop randomly for random users
It's a single server setup, no web farms and no load balancing
Even though the issue I point to above doesn't occur in the logs, is it worth increasing the stateNetworkTimeout attribute anyway? The configuration at the moment is simply
IIS6 Settings
Recycle worker processes (in minutes) = 120
Recycle worker processes (number of requests) = 35000
Recycle worker processes at the following times = Unchecked
Maximum virtual memory = Unchecked
Maximum used memory = Unchecked
Shutdown worker processes after being idle = 90
Limit the kernel request queue = 1500
Everthing else = Unchecked
I have an asp.net site that's basically a giant form for users to submit weekly turkey information for their starter and finisher houses. I use session variables so the information is viewable to a "Review" page. There have been 3 instances where the users would try to submit their information but kept losing their information. As far as I know, they are not letting the page sit idle for more than 20 minutes. I tested it out myself and lost session variables after less than 10 minutes. My sessionState mode is InProc. Should I look into switching to StateServer? If so, how would I do this?
I am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.
The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).
Here is my connection string:
data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))
My session variables don't get saved if the SessionState mode in the web.config file is set to StateServer. But when I changed it to InProc, then everything is fine and good. I'm trying to save a custom built object (or class) into the session after the user logs in.
I have health monitoring enabled on a production system (asp.net webforms .net 4) and I see that there's a lot of errors being sent to me indicating that a session variable has been lost.(I am trying to attach something out of session state to a entity framework data context and get a "Value cannot be null, parameter n ame entity" error). So somehow the session variable now contains null and not an object. Interestingly we have the same application deployed on two separate servers - one DMZ server for external users and one internal server for internal users. Both of these applications on two different servers seem to have the same problem.
Health Monitoring is also monitoring lifetime events and I can see from this that we do not have something like IIS recycling, config changes, changes to bin folder, recompilations etc, occuring. I've read this page: [URL] I can confirm that it's not a Response.Redirect problem because that's not happening - this is an online application form - it puts an object in session state on page_load and there's a multiview - when "next" is pressed, the object comes out of session state, is attached to the data context, changes are made from the web form and the datacontext updated. So there's no response.redirect happening.
I can also confirm the details in "Update 1" and "Update 2" from that link are not relevant to me - there is only 1 worker process running in the application pool and the server name or web address do not contain underscores. I also persued the possibility of session timeouts occuring but they should be handled by other code which is running to detect session timeouts (see: [URL]) which I have tested over and over - Part of the problem is I just cannot reproduce this error myself.......................
I am new to .net 4.0 and am using EF Model and SessionState Mode=SqlServer and I am getting this error below:
Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.
I checked the stack trace and its complaining about
I marked it as serializable but then it complains about System.Data.Objects.ObjectContext is not marked as serializable and hence throws the same error.
I have an ASP.NET web application that takes user input across several forms. Sort of like a wizard. On the first form, the user enters information then clicks the "Next" button. In the Click event of the button I save some information to the Session object (via Properties in the Master page). I then Redirect to the next page. Here is an example of what I am doing:
protected void NextButton_Click(Object sender, EventArgs args) { //Go to the next form Master.SessionVal1 = Value1; Master.SessionVal2 = Value2; Response.Redirect("~/TheNextPage.aspx", false); }
In the MasterPage.cs..
public long Value1 { get { return (long)Session["Value1"]; } set { Session["Value1"] = value; } }
public long Value2 { get { return (long)Session["Value2"]; } set { Session["Value2"] = value; } }
Pretty basic stuff. When I run this in debug mode in VS2008 it works perfectly. When I push this to a test server (IIS7) I get NullReference exceptions when I try to access Value1, Value2, etc. which is stored in the Session object. UPDATE: I have discovered that if I migrate the code to one server I get the problem as described above. BUT, if I promote to another server it works as expected. Both servers are Windows Server 2008 with IIS7. I have looked at the application pool settings and the state management settings and I do not see any differences.
I have a need to run an application in classic mode for backwards compatibility with a specific application, and am trying to understand what kind of impact that will have on the performance of an MVC application that is running on the site. If we put a few static file maps (for .js, .css, .png, etc) above the ASP.NET wildcard map to reduce the amount of processing by the ASP.NET handler, will we be approaching the integrated mode in terms of performance?
The thing i'm primarily concerned with is any effect this might have on output caching. I understand that integrated mode might (?) allow for the output cache to handle non ASP.NET content, but that isn't really a concern. We're more interested in ensuring that the MVC application has full use of the output cache. Empirically i've found that the two configurations operate on par when things go well, but if the page references resources that are not available, the integrated mode tends to fail much more quickly than the classic mode (e.g. 500 ms vs 10 seconds), reducing 'hang time' on the page load.
Generally we should have control of our AppPools and be able to force the Managed Pipeline Mode. In my case I don't have control and would like to implement the code behind code a little differently based on the Managed Pipeline Mode (Integrated vs Classic). I just don't know how to detect this. Is there a simple way to do it from within the code behind page?
When I develop a program in asp.net using vb it run 100% fine in my system but when i upload in domain server and click any button then error comes
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
I develop some simple projects and all of projects can not run on server. Is it problem with our controls ?
I have any new way to program for server side program?
i am develpping a alarm application when user minimized this it should be minimized appear near the system clock,local area connection icon(as hidden icon).
I've got two web portals that are almost identical in architecture. One requires that I add the following to my web.config and enabling the state server, as the logged-in user sessions expire after 2-5 seconds:
I'm having trouble getting 2 identical ASP.NET MVC applications to share the same Session using a Session StateServer. The reason I'm trying to do this is we will eventually be deploying this app across 3 web servers that need to share the same state. We need to use StateServer because we are trying to minimise use of the db for non data-related storage.
The Setup: I've deployed the same code base to http://localhost/App1 and http://localhost/App2
both have identical Web.Config files with the following:
The Result:For both deployments, when the page first loads I can see that the mode is StateServer and the timestamp is getting set to the same time as the realtime value.. However, if this was working, only the first page should have the same time as the realtime value. The second page load should read from the StateServer because that timestamp value is no longer null, and display that time value. But instead, it's displaying the realtime value again.
When I refresh the page, I the timestamp stays the same and the realtime value is always updating. This indicates that the timestamp is being saved to the Session, but the time stamp value is always different for both deployments when it should be the same, so this indicates that the Session is not being shared.
I got a project when after opening in visual studio 2005 in build mode drop down, only debug mode is shown but release mode not shown.Project builds successfully in debug mode is there a way to enable release mode.
gaining mode changing for formview in VB.The problem is that, the current mode im using was ReadOnly, and i want to add some button so thatit could connect to Edit mode in the same formview.Is it necessary to add modechanging and modechanged in the back code?
I wanted my local iis running application to connect my database in sql authentication mode rather than windows mode,
but it is showing errors of " Cannot open database "aspnetdb" requested by the login. The login failed. Login failed for user 'DBUser'. ". i also ublocked port from firewall,and allowed remote connection of mssql from sql manager, enabled TCP/IP and named piped protocols from SQL surface config, and with sql manager i also changed server authentication mode to sql from windows. my datastring is <add connectionString="Data Source=PARTHIV-PCSQLEXPRESS;Initial Catalog=aspnetdb;User ID=******;Password=******/" name="LocalSqlServer" providerName="System.Data.SqlClient" />
i made a user named DBUser in database as well i don't understand where it gone wrong ???