.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Identify First or Second Time Visit to web site

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :ASP.Net


I work in a multi server , multi webfarm environment (without sessions).

We need to be able to identfy if a customer has arrived here for the first or has been before (even though they have not logged in)Not only will we change the text of our salutations depeding on this state but we will also use it in other busness logic


I can check for the existance of a cookie when they fire the Session_onStart event  but I would have to write a cookie out to show they had previously visited for the next time the customer came to call.

If I wrote the cookie out in the Session_onStart then somehow I would have to tell the website that this was a first time visit.

Also as this is a stateless webfarm - the next server may be different from the previous one which would fire a new Session_onStart event in its own right - which would see the cookie and assume it was not my first visit, even though it was my first visit on a different web page of the web site.

I dont want to write it out and say if its within X minutes of the cookie creation time you are still in your first visit as that x minutes wouldnt work 100% of the time

If I dont write the cookie out on Session_onStart then when could I write it out?

I am struggling a little on this so any help would be appreciated.

View Complete Post

More Related Resource Links

In real time how Sharepoint site is deployed from Development to Production?

in our company we are directly working on Production site so we never got scenario to deploy Site to Production Server , so i want to know the procedure to deploy SP site to production Server. in real time do they use any tool to deploy? kindly provide information on this.

Changed to claims based authentication, now I can't access my site. Please help! Time is of the ess

I am in a pretty big bind. I have a sharepoint 2010 site, that was using classic windows authentication. It worked fine from the inside, and I was able to extend it to the outside and it was using https with an SSL certificate. However, my performancepoint reports and my external lists weren't working when the site was accessed from the outside. Apparently this is a known issue with using classic authentication on the outside, so I tried to switch over to claims based authentication. I followed this guide: http://blogs.technet.com/b/wbaer/ar...point-2010.aspx I obviously changed the contoso stuff to my domain name, and changed all of the config files. The problem is, now I can't access the site at all from the inside or the outside. Here is the error I get in my logs: code: An exception occurred when trying to issue security token: Could not connect to [url]http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas.[/url] TCP error code 10061: No connection could be made because the target machine actively refused it . My Sharepoint Central Administration site gives me this warning: code: The Security Token Service is not issuing tokens. The service could be malfunctioning or in a bad state. Remedy Administrator should try to restart the Security Token Service on the boxes where it is not issuing tokens. If problem persists, f

When not open MOSS 2007 site for long time...


Hi all,

I have a web site under constructing using MOSS 2007, when site is not opened for long time, and come some one to open it, MOSS 2007 return error: Error occured, if you have a permission go to webpart editing page to solve the problem...

I don't know why this happen, and how to solve it?



There are too many people accessing the Web site at this time


Hello When I publish my application and host that into IIS.

I got Below errer when i try to access my application from browser.

"There are too many people accessing the Web site at this time"



Ashish Patel, MCTS Software Engineer [Level - 2]

Increase Session Time Out in WSS 3.0 Form based Authentication Site


How to increase session time out for form based authenticated shrepoint site ,

Default Sharepoint  time out is 30 min ...

I want session shuld expire after 120 min..


Sharepoint site getting time period expired



I am having a file which is contain 70,000 data. i try to upload this file into sql server table using front end sharepoint site.i am getting time out period expired error.

But i have added connection timeout=100000 property in connection string still i am facing the same problem

So please help me to solve this issue



Configure Navigation Inheritance at the time of creating the site


Hello All,

I am creating new site in my web application with the template team site. While creating the site I have to click More Option and select the "Yes" for "Use top link bar from the parent Site?" So Is there any way to set it default yes. It is set as "No" default, I want to change it "Yes"...


Can you please help me out to get the scenario solved???

Thanks in Advance.

Site or Site Collection backup for first time Production deployment



I want to know if there is any issue using Site or Site Collection backup for first time Production deployment for either collaboration/Publishining site.



Is there anyway to know the absolute path for site root i design time?


Hi there,


I have an user control that reads the data from app_data folder and does some processing.

In design time I'd like to show the row data in control placeholder (using GetDesignTimeHtml).

To do that I need to figure out the absolute path to app_data folder on my project.

The HttpContext is not available and HostingEnvironment.MapPath returns null.


Is there anyway to solve the problem?




Web site can access by 1 person at a time


I build a web site according to the turotial using visual studio express 2010. Build with:

- DAL (Table adapter,etc)


once copied to live server. The application work fine on 1 user. when multiple user 2 or more, the system was lock until the 1st person completed then the second person can saved.

Anything that i missed out?

Do i need to compile? if yes, can i compile using the express 2010 Build web site function?




Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Take a tour of your SharePoint site

What is a SharePoint site for?
A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you:

Coordinate projects, calendars, and schedules.
Discuss ideas and review documents or proposals.
Share information and keep in touch with other people.

Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.

Round off time to the nearest minute

How would you round this up to the nearest minute? There isn't a built in function to do this so you have to use a little bit of maths to get there. There are 60 seconds in a minute. We already have 38 seconds on the clock. So we need to add on 60 - 38 = 22 more seconds.

Tips to Improve Your ASP.NET Web site performance

ASP.NET has been developed with lots of features which makes developer life easy. Start from ViewState, PostBack, Server Controls , User Controls and etc. All of them can make your web development experience fun and easy, but improper use of them can cause your site performance slowdown. Most of the controls generate overhead to the client and server. Therefore in this article, I I will list out about things you can do and don't to improve your ASP.NET website performance.

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend