[Global.asax] how to manage two or more of them?

T

teo

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?
 
P

Patrice

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
 
G

George Ter-Saakov

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.
 
T

teo

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top