Last post Jan 03, 2017 09:13 AM by Cathy Zou
Jan 02, 2017 06:14 AM|vineeta1shukla|LINK
I am facing some strange issue in my website.
if i create app_code folder and placing any .cs class in this folder, session returns null objects.but if i rename App_Code folder with other name it is working fine.
can any body please help?
Thanks in advance,
Jan 02, 2017 07:28 AM|francissvk|LINK
If you change any class files in "app_code" folder, it will be automatically compiled by ASP.Net. That may be reason.
Jan 02, 2017 11:20 AM|0belix|LINK
When you change or add a file on App_Code, the website is recompiled, so the session gets restarted. When you change the name of the folder, it no longer is a system folder, so the ASP engine treats it like an ordinary folder, allowing you to make the changes
you wish without forcing a recompilation of the website. Usualy, changes to global.asax and web.config will also force the website to be recompiled.
I have, however, heard/read something about the new framework regarding this issue. Something about no longer being forced the recompilation, but i'm can't recall exactely under which circunstances.
Jan 03, 2017 09:13 AM|Cathy Zou|LINK
App_Code folder contains source code for shared classes and business objects (for example, ..cs, and .vb files) that you want to compile as part of your application. In a dynamically compiled Web site project, ASP.NET compiles the code in the App_Code folder
on the initial request to your application. Items in this folder are then recompiled when any changes are detected.
For more information, please refer to the links below: