I have two .aspx pages
they use two different Global.asax files
when I "Publish" the first .aspx page,
its Global.asax is transformed in
App_global.asax.compiled
App_global.asax.dll
to put in the Bin folder
and
when I "Publish" the second .aspx page,
its Global.asax is transformed in the SAME files
App_global.asax.compiled
App_global.asax.dll
to put in the Bin folder
So, because they have the same names,
a conflict (=overwriting) occurs.
How to solve this?
In general, how to manage this "multiple Global.asax" situation?
Or am I missing something in building my web projects?
Patrice - 24 Aug 2007 14:46 GMT
Not sure to understand what is your scenario. A page is a .aspx file with
perhaps its .aspx.<language> file. It doesn't have a global.asax file which
is an application wide file that includes events for the whole application.
For now i t would seem to me that you work on a single site when it would be
rather two sites from an architectural point of view ???
Seee :
http://msdn2.microsoft.com/en-us/library/2027ewzw(VS.80).aspx
--
Patrice
>I have two .aspx pages
>
[quoted text clipped - 21 lines]
> In general, how to manage this "multiple Global.asax" situation?
> Or am I missing something in building my web projects?
George Ter-Saakov - 24 Aug 2007 20:02 GMT
How did you manage to have 2 Global.asax files?
Do you have application in application?
If yes then that subapplicaition should have it's own Bin folder.
George.
>I have two .aspx pages
>
[quoted text clipped - 21 lines]
> In general, how to manage this "multiple Global.asax" situation?
> Or am I missing something in building my web projects?
teo - 24 Aug 2007 21:16 GMT
My site is like this:
http://www.mySite.it
under mySite I have
a .html file (it is the home-page file)
a Bin folder
a FirstAspxPage folder
a SecondAspx Page folder
in the FirstAspxPage folder I have mypage1.aspx
in the SecondAspxPage folder I have mypage2.aspx
--------------------
I start using the Global.asax file for its Session_End event
(I needed to clean some temporary files up from the FirstAspxPage folder)
After several month I created a second .aspx page
in a new VisualStudio2005 Solution.
I had a new Global.asax file and I used it (similar cleaning task)
Then I decided to name it as mypage2.aspx
and to put it in the SecondAspxPage folder.
But now I have two Global.asax file to put in the Bin folder
------------------------------
How to manage them?
Have I to use an unique Global.asax ?
If I use an unique Global.asax file,
when a Session_End event is fired,
how can I determine
if it was fired by mypage1.aspx or by mypage2.aspx ?