MVC :: State Server / Cookieless - Error 310

Dec 23, 2010

For a project (ASP.NET MVC 2 web application) we needed to use cookieless sessions. Furthermore, we use the ASP.NET State service, because the application is hosted on 21 web servers and we need to be able to share the session state. So the default InProc setting is not an option. Actually we enabled the ASP.NET State service on all of the web servers. The application's configuration file contains a custom configuration section which contains a list of the state servers. For example:

[Code]....

We created a class which descends from the sessionIdManager class. Our session id manager uses the session id generated by the base class and prefixes it with two numbers (00, 01, 02...etc). This number represents the index of one of the state servers displayed in the above list. We pseudo-randomly pick one of the state servers in order to balance the load accross the servers. Then we implemented the
IPartitionResolver interface. Our resolver does the following:

Read our custom session idExtract the index which we appended (e.g. 01)Retrieve the information of the state server from the configuration file (192.168.0.102:42424) the state server information (IP & Port) is used to inform ASP.NET where the ASP.NET State server for this session is located. This setup works fine if we work with exactly one state server (e.g. development environment). It also works fine on our acceptance environment (2 state servers). But after we did a test by enabling 21 state servers and deploying the application on 21 web servers things went wrong. Sometimes the site would function correctly, but now and then we receive an 310 error. The browser informed us that the web page has resulted in too many redirects.

We created a new blank ASP.NET MVC site and implemented this custom session management and voila .... reproducable. Monitoring the traffic with Fiddler gave the following results:

A 302 status is returned containing the same location but a different session id: k heb met Fiddler de HTTP trafiek gemonitord en hetgeen ik tot hiertoe heb ontdekt, is dat er bij een request een status 302 wordt teruggeven met daarin dezelfde location maar andere sessionId.Voorbeeld

Response:HTTP/1.1 302 Found
Server: ASP.NET Development Server/10.0.0.0
Date: Thu, 23 Dec 2010 09:11:31 GMT
X-AspNet-Version: 4.0.30319
Location: /(S(17zprjcofc030gl3ph4lfqaklx))/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 150
Connection: Close
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/(S(17zprjcofc030gl3ph4lfqaklx))/">here</a>.</h2>
</body></html>

this redirect keeps happening, each time with a different session id until a session id is generated that points to the web server which is also handling the ASP.NET request. Then the page will be shown.

Request: /(S(00cq1vtfyxsvfwxx2lply2zlma))/
Response:
HTTP/1.1 302 Found
Server: ASP.NET Development Server/10.0.0.

Date: Thu, 23 Dec 2010 09:13:13 GMT
X-AspNet-Version: 4.0.30319


Location: /(S(00qbn3zut5mzek3fd4pq5pqt3a))/
Cache-Control: privat
Content-Type: text/html; charset=utf-8
Content-Length: 150
Connection: Clos
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/(S(00qbn3zut5mzek3fd4pq5pqt3a))/">here</a>.</h2>
</body></html>
New request: /(S(00qbn3zut5mzek3fd4pq5pqt3a))
Response:
TTP/1.1 200 OK
Server: ASP.NET Development Server/10.0.0.
Date: Thu, 23 Dec 2010 09:13:13 GMT
X-AspNet-Version: 4.0.30319
X-AspNetMvc-Version: 2.
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 1365
Connection: Close

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL]TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="[URL]">
<head><title>
Home Page

</title><link href="Content/Site.css" rel="stylesheet" type="text/css" /></head>
<body>

Thus the chance that a session id for the same server is created is smaller if more state servers are added to the list.

View 3 Replies


Similar Messages:

State Management :: How To Use Cookieless Session

Aug 28, 2010

I want to know how its work and it advantage and disadvantege

View 2 Replies

State Management :: Generating URL For Cookieless Session?

Apr 8, 2010

How do you generate a URL for that uses cookieless sessions?

Neither Request.RawURL or Request.URL has the rewritten version that includes the sessionid.

View 3 Replies

Get Uploadify To Work With Cookieless Session State?

Jan 18, 2010

I have an uploadify control working fine in a vb.net web application - however whenever I switch on cookieless session state in web.config (cookieless="true") - it stops working.

In my upload IHttpHandler I can see that the data stored by uploadify is nothing:

Private Function Process(ByVal context As HttpContext) As String
Dim File As HttpPostedFile
File = context.Request.Files("filedata") ' Nothing
Dim FileExt As String = context.Request("fileExt") ' Nothing, etc
...

View 1 Replies

State Management :: Rewritepath Not Working With Cookieless Sessions

Apr 21, 2010

I've been working on this problem for some time without success. We have this website that has been working for many years now and we have been using cookieless sessions since the begining. Now we are integrating with another site to handle payment throught redirection. This provider ask for two adresses for success or failure of a payment so we have something like [URL] and [URL]. For design purpose thoses two pages do not exists and I use an httpModule to route to the proper page. I use httpApplication.Context.RewritePath to send to the proper page but I can never find back the session my user had before redirecting to the payment provider.

If I change the session mecanism to use cookies (cookieless="false" or cookieless="UseUri") with a few other tweaks, everything works fine Does anybody know if this has a chance to work? Is there a way to re-attach to an existing session?

View 2 Replies

State Management :: Cookieless Sessions And IIS6 Causes A Redirect Loop

Aug 9, 2010

I have an ASP .NET website that uses cookieless sessions When the initial request is made to the site IE just displays the standard "Internet Explorer cannot display the webpage" message Firefox displays the following message: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. *This problem can sometimes be caused by disabling or refusing to accept cookies. The site works fine with my development server and under IIS6. If I switch off cookieless sessions then everything is fine

View 3 Replies

What's Difference Between Normal Session State And Cookieless Session State

Feb 16, 2010

In ASP.NET, I'm a bit confused about role of cookies in session state. Whats is the difference between normal session state and cookieless session state?

View 5 Replies

Web Forms :: 3.5 Error: Unable To Make The Session State Request To The Session State Server?

Dec 7, 2010

Have not run the ASP.NET Development Server for a while. Today I copied a production website to my workstation and ran it with VS 2008. The following error message popped up. What is the problem with the ASP.NET development Server on my workstation? The website on the Production server still ran okay.Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of KEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesaspnet_stateParametersAllowRemoteConnection.
If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

View 2 Replies

SQL Server :: Getting Error. Server: Msg 170, Level 15, State 1, Line 1?

Jan 30, 2011

Declare @tmpTblNm varchar(60)

Declare @Valu1 varchar(50)

set @Valu1='val'; [code]...

I am getting the following error.

Server: Msg 170, Level 15, State 1, Line 1

Line 1: Incorrect syntax near 'I'.

View 2 Replies

State Management :: Set The Mode Of Session State As State Server And Point To Another Server?

Aug 26, 2010

In my web application, I set the mode of session state as State Server and point to another server. After run some days, I always meet following exception:

The state server has closed an expired TCP/IP connection. The IP address of the client is 192.168.80.157. The expired Read operation began at 08/25/2010 14:18:03.

View 2 Replies

State Management :: Server Error: [HttpException (0x80004005): Invalid_Viewstate

Feb 8, 2011

This bug is very difficult to troubleshoot. I run 4 apps on the same server, all 4 are clones from the first one, just differ on their database connection. 2 run perfectly, but on two of them, when making a postback from a certain page, by clicking a button or by changing a datagrid page, it throws this error:

[code]....

View 1 Replies

State Management :: Why Session_OnEnd Does Not Fire In State Server & SQL Server Modes

Sep 8, 2010

Why Session_OnEnd does not fire in state server & SQL Server modes....... i mean what is the speciality in InProc mode that Session_OnEnd fires in that mode only ????

View 1 Replies

State Management :: Error The State Information Is Invalid For This Page And Might Be Corrupted While Executing Application

May 26, 2010

I am getting this error while executing my Asp.Net application.i am not able to execute application using Visual Studio Interface and when i am trying to execute application from Local IIS. its executing well but when i am trying to click any button for searching etc it is giving this error. The state information is invalid for this page and might be corrupted. The detailed information is

[Code]....

[FormatException: Invalid character in a Base-64 string.] System.Convert.FromBase64String(String s) +0 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37 System.Web.UI.HiddenFieldPageStatePersister.Load() +113[ViewStateException: Invalid viewstate. Client IP: 127.0.0.1Port: 1307User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5ViewState: /wEPDwULLTIwOTUyMjAzMTgPZBYCZg9kFgICAw9kFgICCw9kFgICAQ9kFhgCAg8QDxYCHgtfIURhdGFCb3VuZGdkDxYFAgECAgIDAgQCBRYFEAUHQ2VudHJhbAUCODBnEAUITm9ydGhlcm4FAjgxZxAFB0Vhc3Rlcm4FAjgyZxAFCFNvdXRoZXJuBQI4M2cQBQdXZXN0ZXJuBQI4NGdkZAIJD2QWAmYPZBYKAgEPEA8WAh8AZ2QPFgUCAQICAgMCBAIFFgUQBQdDZW50cmFsBQI4MGcQBQdFYXN0ZXJuBQI4MmcQBQhOb3J0aGVybgUCODFnEAUIU291dGhlcm4FAjgzZxAFB1dlc3Rlcm4FAjg0ZxYBZmQCBw8QDxYCHwBnZGQWAWZkAgkPD2QPEBYBZhYBFgIeDlBhcmFtZXRlclZhbHVlBQItMRYBZmRkAgsPEA8WAh8AZ2RkFgFmZAINDw9kDxAWAWYWARYCHwEFAi0xFgFmZGQCCg9kFghmDw8WAh4JTWF4TGVuZ3RoZmRkAggPDxYEHgxNYXhpbXVtVmFsdWUFCTUvMjYvMjAxMB4MTWluaW11bVZhbHVlBQk1LzI2LzE5MTBkZAIMDxYQHhlDdWx0dXJlRGVjaW1hbFBsYWNlaG9sZGVyBQEuHgdDdWx0dXJlBQVlbi1VUx4bQ3VsdHVyZVRob3VzYW5kc1BsYWNlaG9sZGVyBQEsHg5DdWx0dXJlRGF0ZUZNVAUDTURZHhZDdWx0dXJlQU1QTVBsYWNlaG9sZGVyBQVBTTtQTR4WQ3VsdHVyZVRpbWVQbGFjZWhvbGRlcgUBOh4WQ3VsdHVyZU...][HttpException (0x80004005): The state information is invalid for this page and might be corrupted.] System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +106 System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +14 System.Web.UI.HiddenFieldPageStatePersister.Load() +217 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105 System.Web.UI.Page.LoadAllState() +43 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242 System.Web.UI.Page.ProcessRequest() +80 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.pages__cmtickets_cmtickets_reports_cmtickets_search_aspx.ProcessRequest(HttpContext context) in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesapp_mobily_alexmare1eddc658e6f2ba5App_Web_b9acfmsy.14.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

View 3 Replies

SQL Server :: Working With Geometry Data Type - Error: "Msg 403 - Level 16 - State"

Jul 12, 2010

I have a sql server 2008 database table that has a column of type geometry. I am trying to update the data for a record. The data that needs to be inserted into the database is a POINT location that i get off of two text fields on an .NET form. I pass the values into a procedure to update the record. Below is what I have been trying with no luck. The @lat and @long variables I pass into the procedure as type. Does anyone have a good way to update this data? When I try to compile this code it gives the error: "Msg 403, Level 16, State 1, Procedure UPDATE_LAT_LONG, Line 19 Invalid operator for data type. Operator equals add, type equals geometry."

create
PROCEDURE [dbo].[UPDATE_LAT_LONG]
(@PK int,
@lat geometry,
@long geometry )
AS
BEGIN
SET
NOCOUNT
ON;
UPDATE MITIGATION_REPORTING.dbo.MR_MITIGATION
SET MR_MITIGATION_LATITUDE_LONGITUDE =
'(''POINT('+cast(@lat
as
geometry)+' '+cast(@long
as
geometry)+')'')'
WHERE MR_MITIGATION_PK = @PK;
END

View 1 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies

State Management :: Recreate State Session Database In SQL Server 2008?

Apr 5, 2010

Our ASP.NET App uses ASP State Session Management and has been rebuilt about 2 years ago [With .NET Framework 2.0]. We are currently in .NET framework 3.5 and have moved to SQL Server 2008 - but continue to use the same ASPState database. The State database has been upgraded to SQL Server 2008. Since then we have are seeing timouts/locks on ASPStateTempSessions table. I am wondering if we have to rebuild this database from scratch with some newer scripts?

View 2 Replies

State Management :: Error On Page And "Unknown Error - Code 0" In Error Message?

Dec 6, 2010

I have a serious problem with "Error on Page". The error message points to line number 939, char 13. In my code behind (C#) in line number 939 is only an obsolete method found which is no longer called. The aspx file has only 339 lines. What the heck is line number 939?The Webapplication allows a special user group to change some group memberships for members of another user group in Active Directory. The App handles 3internal DataViews derived from corresponding DataTables as DataSource for 3 GridViews and some other internal lists with objects (List<obj>).

It uses windows authentication to get current users credentials and his membership in the "Operators" group. This credentials will be passed-through to allow the process managing group memberships in active directory.After starting the App in browser it seems to work fine. But after an indeterminated time it doesn't longer respond. After each click on buttons (or link buttons) you only can see the message "Error on Page" in the browsers status bar below.I played with session timeout, storing the DataTables in session variables, without success.

Last week I found this article here: [URL]" and I addedEnableEventValidation="false" ViewStateEncryptionMode="Never"
to Page declaration. However, at some point the the server does not respond. Each time the worker process on webserver recycles it seems the application turn to wrong state. Might be important: All controls including GridViews are embedded in an AJAX UpdatePanel. How to get a better error message? Debugging is enabled and Custom Error handling On, Off or Remote Only brings the same result as described.

View 3 Replies

State Management :: Version 2.0 Session State Not Installed On SQL Server?

Oct 27, 2010

The fix for this error message is to run [Code]..... I have run that uptown, downtown and in my lady's chamber and it does no good, although it never complains. Are there any other possibilities?Details:
IIS Server: v5.1 running on XP. SQLServer 2005 running on a different XP box.Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618 There is an ASPState database on the server, containing only two tables: [Code].... and [Code]..... I did not use [Code].... when I ran [Code]....
.

View 2 Replies

Security :: Session State SQL Server State Mode?

May 4, 2010

In my database I have already installed the aspnetdb membership tables and process (think that was running : aspnet_regsql.exe) with all my other custom build tables for my project. All works fine.I want to use SQL server session state. (Asp.net 2.0, SQL server 2005)My project will be on a SHARED HOSTING environment, and I only want ONE database that holds all I need ( membership, custom tables, session state table, etc)I see two files in : C:WINDOWSMicrosoft.NETFrameworkv2.0.50727

InstallSqlState.sql
InstallSqlStateTemplate.sql

I assume I run the "InstallSqlStateTemplate.sql" and follow instruction from this reference to SQL server session state operational in my single project database : [URL]

View 2 Replies

Get Absolute Url With Cookieless Session?

Jul 5, 2010

Is there some method in asp.net for getting an absolute url with cookieless session? UPDATE: I need create other new URL. It is not requested URL. I´m using Response.ApplyAppPathModifier for getting relative URL with cookie session.

View 2 Replies

State Management :: Error :Session State Has Created A Session Id, But Cannot Save It?

Nov 18, 2010

I read the solutioin for this error, at the following link :http://forums.asp.net/p/1046935/1576341.aspxbut I am still not clear what exactly causes the error. I have two doubts :1. Can anyone please elaborate a bit on this issue, with any example ????2. Is there any drawback of this approach ?

View 4 Replies

AJAX :: HTMLEditor & Cookieless Authentication?

Jun 22, 2010

I put an HTMLEditor Control (aka Editor) into a webpage and set the forms authentication to cookielessLike so

<authentication mode="Forms">

View 2 Replies

Security :: Implement Cookieless Authentication In .net?

Apr 1, 2010

how can i implement cookieless authentication in .net??

View 5 Replies

SQL Server :: Connection To Sql Server / Error "A Network-related Or Instance-specific Error Occurred While Establishing A Connection To SQL Server

Nov 23, 2010

I just installed sql server 2008 R2 on my computer. I am trying to connect to sql server throught my C# code and everytime I run the C# program,

I get this error "A network-related or instance-specific error occurred while establishing a connection to SQL Server.

The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) "

The connection string that I used in my web.config file is

[Code]....

I am not sure what am I doing wrong, but I followed this article below step by step and still I am getting the same error

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

My instance name is MSSQLSERVER and the server that I am using is on my local machine and it has my computer name in it.

View 10 Replies

SQL Server :: Receiving An Error - A Network-related Or Instance-specific Error Occurred While Establishing A Connection To SQL Server

Sep 23, 2010

I've created a small website with a simple sqlite database using vwd 2010 .net 4. In dev and test envionments everything works fine, however when i promote to my hosting provider i receive the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I've been configuring the connection strings (autogenerated from entity framework and attached db) but unable to get it working on the hosting provider, I'm assuming it's related to permissions but not entirely sure how to resolve - here's the web.config as it stands:

<add
name="ApplicationServices"
connectionString="data [code].....

For info the environments are set up as follows:

- Dev environment is vwd express 2010 with sqlite mdf attached

- Test environment is windows 7 server, iis 7 with appdomain identity set to network service

View 6 Replies







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