473,395 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Web farm question

Hi guys,

I am working on a shopping cart application, it works fine on a stand alone
sever, but not on a web farm environment. The items I added to shopping cart
could disappear suddenly, I think the following codes might have somthing to
do with the problem.
string cookiedata;
HttpCookie authcookie =
Request.Cookies[FormsAuthentication.FormsCookieName];
if (authcookie != null)
{
cookiedata = authcookie.Value;
FormsAuthenticationTicket ticket =
FormsAuthentication.Decrypt(cookiedata);
if (ticket.Name.Trim() != string.Empty)
{
Guid g = new Guid(ticket.Name);
DB.ExecuteSQL("update Customer set LastIPAddress=" +
DB.SQuote(CommonLogic.ServerVariables("REMOTE_ADDR ")) + " where
CustomerGUID=" + DB.SQuote(g.ToString()));
Customer ThisCustomer = new Customer(g, AppLogic.IsAdminSite);
Context.User = new AspDotNetStorefrontPrincipal(ThisCustomer);
}
else
{
FormsAuthentication.SignOut();
Context.User = new AspDotNetStorefrontPrincipal(new
Customer(AppLogic.IsAdminSite));
}
}
else
{
//insert a record into customer table and do something else
}

Does FormsAuthentication info persist from one server to another?

TIA
Jun 27 '08 #1
1 1258
I think you'll need to set the encryption keys so they're the same on
all servers in the farm.
http://technet2.microsoft.com/window....mspx?mfr=true

Terry.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: obhayes | last post by:
Hi All, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
1
by: brad | last post by:
Hi, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
5
by: Hidden Desi | last post by:
Hi all, I am implementing a .NET web application and extensively used the session variables to store data. But today my manager told me that we will be running that application in a web farm !!!!...
3
by: Steve | last post by:
Hi What is difference between web farm and web garden? What i understand so far Web Farm Multi Server Environment Support Session share Application object not supported Caching not...
3
by: Martin | last post by:
I'm plannig an asp.net web farm. I expect to use a SQL database for session state management, ie. <sessionState mode="SQLServer" cookieless="false" .../> My application uses web forms...
5
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature....
1
by: Leo Muller | last post by:
I am running webservers in a web farm (multiple servers), and I want to use the viewstate. I do not want to disable the viewstate encryption check. I also run multiple sites on the same webservers....
0
by: gabedog | last post by:
What would be a good (and safe) way to enable/disable a web site in a web farm that needs to come down for maintenance? Periodically, we have db folks that run db scripts. I'd like to put a back...
4
by: Jeff | last post by:
Hey ASP.NET 2.0 I'm preparing for a www.123assess.com test and in that intention I yesterday took a skill assessment test at microsoft.com. Today I'm reviewing some of the questions I had...
3
by: latif87 | last post by:
An example of how the XML file is structured: <xml> <farm name="NAME1"> <size x="INTEGER1" y="INTEGER2" /> <neighbor name="NAME2" /> <crop name="PLANT" area="INTEGER3" /> <crop … /> … </farm>...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.