.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

Need Help with Website Sessions Expiring or a Time out.

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :ASP.Net

I work for Motorcycle Market, a company that sells Motorcycle Parts and Motorcycle Accessories. We are on IIS 7 and SQL Server 2008.  The problem is after a certain period of time or if an IIS reset takes place, the very first time the website is opened from any url besides the homepage url [ Motorcycle Accessories ], the website gets redirected to the homepage.  Here are some examples to explain further:

An IIS Reset is done.  If you click on Motorcycle Parts in this post or you copy and past any url into IE or Mozilla, http://www.motorcyclemarket.com/harley-davidson-0-d3.aspx, the website gets redirected to the home page.  Then if you enter this or any url back directly into the browser, http://www.motorcyclemarket.com/harley-davidson-0-d3.aspx, it takes you to the correct page.

After a certain time period, if no users are searching the website, and I am not sure what this time period is, it happens randomply throughout the day, you click on any link,

View Complete Post

More Related Resource Links

Automatically Execute Code at certain time from website


Is there a way to trigger a piece of code to execute at a certain time once a week?

I basically want my website to send out a reminder email every sunday. I have a function called SendReminder() and I would like to know if it is posible for it to run by itself because at the minute I have to press a button to run it.


Problem with 1st time loading of website



I am facing a strange issue with my website ... If there is a longer inactive period (say a few hours) on my website, and when it is first opened after a longer period of inactivity, it takes almost 50 to 60 seconds to load 1st page.

However, thenafter if you reload the indexpage or open any other pages, they are opening in a few seconds.

This is trace information about opening my default page . (After 8 ours of innactivity)

aspx.page Begin PreInit
aspx.page End PreInit 6,5818664 6,581866
aspx.page Begin Init 6,5971016 0,015235
aspx.page End Init 6,9403593 0,343258
aspx.page Begin InitComplete 6,9404871 0,000128
aspx.page End InitComplete 6,9406603 0,000173
aspx.page Begin PreLoad 6,940708 0,000048
aspx.page End PreLoad 6,9622082 0,021500
aspx.page Begin Load 6,9623434 0,000135
aspx.page End Load 44,5811131 37,618770
aspx.page Begin LoadComplete 44,6315493 0,050436
aspx.page End LoadComplete 44,6571296 0,025580
aspx.page Begin PreRender 44,65722 0,000090
aspx.page End PreRender 45,0207436 0,363524
aspx.page Begin PreRenderComplete 45,0208894 0,000146
aspx.page End PreRenderComplete 50,0494938 5,028604
aspx.page Begin SaveState 50,3189146 0,269421
aspx.page End SaveState 51,6102916 1,291377

one user open a website (one computer and not another computer) on same time


how to restrict web site one time login(1101) at same time nobody used  this id (1101)

redirect asp.net website having Sessions from localhost by passing the session values


hi friends

             I want to open a web site in code by giving the server url, but in that server page we are restricting if session is null. Is work the session passing from the localhost in server???

How to pass session from local host to server



How Sessions Time Out....?

The article How Sessions Time Out....? was added by durga89 on Thursday, February 17, 2011.

I wonder some times how statemanagement efficiently helps a developer to handle the user sessions. Session state management is one which should be handled with care, Other wise it can create various problems. We have to identify how are these sessions

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.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.

Date and Time Functions in SQLSERVER

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

.NET 4 Web Application Startup Time

I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself that helped. If you have a giant app, you should do some tests.

Built-in Functions - Date and Time Functions

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

Essential SQL Server Date, Time and DateTime Functions

The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.

Date/Time Conversions Using SQL Server

There are many instances when dates and times don't show up at your doorstep in the format you'd like it to be, nor does the output of a query fit the needs of the people viewing it. One option is to format the data in the application itself. Another option is to use the built-in functions SQL Server provides to format the date string for you.

Date and Time Data Types and Functions

The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

Resources for soup-to-nuts of website development lifecycle



 I'm looking for a website, or book, or some resource that can lead me down the path from website design to implementation/deployment. I know that covers a ton of material, but I am really looking for the bullet points, or high-lights, to make sure that I think of everything. I am mostly fuzzy on security measures and deployment since I haven't been involved in those aspects before.

Background:  I have been a programmer for many years, and with a little over 3 years' experience coding websites in vb.net/asp.net with sql server. Due to recent restructuring/layoffs at our firm, I find myself in the position of lead IT person - I'm feeling a bit underqualified but I feel this is my chance to work hard and step up to it. I'm very good at vb.net, master pages, css, asp.net, sql server. I'm worried that the person who was the lead before was doing a bunch of stuff that I'm not aware of...so I need to start learning more than just the code. I don't need lessons on how to code anything...I need to learn how it all gets put together - the next step up.

thanks for any suggestions!

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