Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #31 (permalink)  
Old September 16th, 2004, 08:38 AM
Registered User
 
Join Date: Sep 2004
Location: , VT, .
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?

Reply With Quote
  #32 (permalink)  
Old September 16th, 2004, 08:47 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
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
Reply With Quote
  #33 (permalink)  
Old September 16th, 2004, 01:03 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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?
Reply With Quote
  #34 (permalink)  
Old September 16th, 2004, 01:08 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
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
Reply With Quote
  #35 (permalink)  
Old September 16th, 2004, 01:10 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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?
Reply With Quote
  #36 (permalink)  
Old September 16th, 2004, 01:19 PM
Registered User
 
Join Date: Sep 2004
Location: , VT, .
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?

Reply With Quote
  #37 (permalink)  
Old September 16th, 2004, 02:09 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
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
Reply With Quote
  #38 (permalink)  
Old September 17th, 2004, 09:50 AM
Registered User
 
Join Date: Sep 2004
Location: , VT, .
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.

Reply With Quote
  #39 (permalink)  
Old September 17th, 2004, 12:55 PM
Registered User
 
Join Date: Sep 2004
Location: , VT, .
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

Reply With Quote
  #40 (permalink)  
Old September 19th, 2004, 04:25 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:07 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.