Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 08:38 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using both sessions and application variables. We have a webfarm so we use SQL mode. My application variables (basically an application counter) keep getting reset. If I update the application scripts or restart IIS do the application variables reset also?

 
Old September 16th, 2004, 08:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Application variables reset every time the application starts.. that means if you turn of IIS and turn it back on, it will reset. Change the .DLL's and it resets (as it respins up with the new DLL).

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old September 16th, 2004, 01:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

But I don't think this will be the case when you use a StateServer or Sql Server as indicated by the OP.
In fact, I think the whole idea about storing state in a separate (Sql) server is make the session info survive server restarts / reboots (and exposing the data to a Web farm of course).

Bit why don't you try it out? Store some stuff in a session, restart IIS and see if it's still there....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Next Plateau by Junkie XL (Track 11 from the album: Big Sounds of the Drags) What's This?
 
Old September 16th, 2004, 01:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Imar, that's true for session variables.. he was asking about APPLICATION variables :)


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old September 16th, 2004, 01:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Whoooops, sorry about that. Answered too quick ;)

Thanks for the correction.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: garden of departure by 360's (Track 5 from the album: illuminated) What's This?
 
Old September 16th, 2004, 01:19 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hal,

So session variables are stored in the SQL but application variables are not? I was under the impression when I set up the SQL mode that it would store both (session and application) in the SQL db. Is there a way for this other than rolling my own script to insert into the db?

 
Old September 16th, 2004, 02:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I wish this was in a seperate thread!... anyway- yes, App variables are always stored in memory on the server. THe idea is that App variables shouldn't be anything but lookup kinds of things... Nothing really dynamic should be there- such as something counting the number of visitors.. something like that should be cusom built as user control (or custom control) and have a DB Backend.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old September 17th, 2004, 09:50 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Hal Levy
 I wish this was in a seperate thread!... snip


I will be more careful :) Thanks for the response. It cleared things up for me.

 
Old September 17th, 2004, 12:55 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Ron Howerton
 Thanks for the suggestion. Although I've already changed my code, I did look for the log file as you suggest. What I found was this:

... snipped....
I am a IIS newbie learning .NET. Where is this log file located? My config is standard-- I dont know enough to have done anything out of the default settings/paths I dont think.

TIA

 
Old September 19th, 2004, 04:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The default location is somewhere under the Windows folder.

To find out the exact location for each site, open up the IIS manager, locate your Web site, right-click it and choose Properties. On the Web Site tab click Properties in the Enable Logging area. You'll find the location for the log files on the bottom of the dialog that opened.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Bizarre Love Triangle by New Order (Track 11 from the album: Substance - Disc 1) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Variables Randomly Disappeared Dmitriy .NET Framework 1.x 1 November 30th, 2006 01:24 AM
Session Variables in C# shikha09 C# 1 November 28th, 2006 10:38 AM
Session Variables Randomly Disappeared Dmitriy General .NET 0 November 20th, 2006 08:42 AM
Is it possible for me using session variables into see07 ASP.NET 1.x and 2.0 Application Design 4 March 9th, 2005 07:46 PM
session variables help face Classic ASP Databases 4 September 12th, 2003 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.