Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 April 6th, 2005, 12:38 AM
Registered User
 
Join Date: Apr 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session gets null

Hi

In my project i am generating new File.ASPX and File.ASPX.CS file. After writeing files in Harddisk a just compile the code using CodeDOM class, its getting compile sucessfully, the problem is when i redirect the page session gets null, if dont compile in programmatcally Session remain,

Can u drop me some line,

Advance in thanks guys...

Regards,
Senthil R:)

 
Old April 10th, 2005, 03:54 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This is caused by a feature of asp.net.

Any time a file changes in the directory where an application lives (virtual application, web root, etc) asp.net resets the application state and dynamically recompiles the pages. As a result any change (new or save) on a file type that .net watches (.dll, .as?x, web.config and others) will cause this reset to happen.

Depending on what you are doing there may be a better way to do it that doesn't include creating page and code behind files on the fly.

-Peter
 
Old April 13th, 2005, 02:50 PM
Authorized User
 
Join Date: Mar 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And you could always store the data in persistent cookies instead of session vars, as they would be remembered even when the application reloads, unlike session vars.

Justin Toth
http://www.universityauction.net





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session gets null on Response.Redirect Baby_programmer ASP.NET Espanol 5 June 15th, 2006 05:29 AM
How to set Not Null constraint to Null Columns arasu Oracle 1 August 22nd, 2005 10:09 AM
Session gets null on Response.Redirect Baby_programmer ASP.NET 1.x and 2.0 Application Design 2 March 11th, 2005 12:38 AM
Session Gets null on Response.Redirect Baby_programmer ASP.NET 1.0 and 1.1 Basics 1 March 8th, 2005 03:30 PM
Session gets Null on Response.Redirect Baby_programmer ASP.NET 1.0 and 1.1 Professional 0 March 3rd, 2005 01:57 AM





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