Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
teo - 24 Aug 2007 14:16 GMT
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 ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.