ASP.NET 2005 : where is Global.asax ?

Discussion in 'ASP .Net' started by John A Grandy, Oct 18, 2005.

  1. I installed VS05 RC , created a new Web Site , but I do not see Global.asax
    , and I do not see Global.asax.cs in the App_Code dir ......
    John A Grandy, Oct 18, 2005
    #1
    1. Advertising

  2. A global.asax is not created by default.

    Select "File", "New", "File", and select "Global Application Class"
    from the templates.

    Or, right-click the website's name in the Solution Explorer and select
    "Add new item" and select "Global Application Class" from the templates.



    Juan T. Llibre, ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    Foros de ASP.NET en Español : http://asp.net.do/foros/
    ======================================
    "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    news:...
    >I installed VS05 RC , created a new Web Site , but I do not see Global.asax , and I do
    >not see Global.asax.cs in the App_Code dir ......
    Juan T. Llibre, Oct 18, 2005
    #2
    1. Advertising

  3. Ok. I was able to do that. But apparently Global.asax.cs no longer exists
    .... the various methods ( Application_Start , etc. ) instead show inline in
    Global.asax ...

    Why did they do this ?


    "Juan T. Llibre" <> wrote in message
    news:%...
    >A global.asax is not created by default.
    >
    > Select "File", "New", "File", and select "Global Application Class"
    > from the templates.
    >
    > Or, right-click the website's name in the Solution Explorer and select
    > "Add new item" and select "Global Application Class" from the templates.
    >
    >
    >
    > Juan T. Llibre, ASP.NET MVP
    > ASP.NET FAQ : http://asp.net.do/faq/
    > Foros de ASP.NET en Español : http://asp.net.do/foros/
    > ======================================
    > "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    > news:...
    >>I installed VS05 RC , created a new Web Site , but I do not see
    >>Global.asax , and I do not see Global.asax.cs in the App_Code dir ......

    >
    >
    John A Grandy, Oct 18, 2005
    #3
  4. I guess they figure that, since global.asax doesn't have a UI,
    writing the code inline in global.asax saves the extra step involved
    in writing code into a codebehind file.

    The purpose of codebehind is to separate code from UI.
    Since global.asax has no UI, it doesn't need to have codebehind.

    You can do anything you want inline in global.asax
    that you could do in previous incarnations of codebehind global.asax.




    Juan T. Llibre, ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    Foros de ASP.NET en Español : http://asp.net.do/foros/
    ======================================
    "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    news:O%...
    > Ok. I was able to do that. But apparently Global.asax.cs no longer exists ... the
    > various methods ( Application_Start , etc. ) instead show inline in Global.asax ...
    >
    > Why did they do this ?
    >
    >
    > "Juan T. Llibre" <> wrote in message
    > news:%...
    >>A global.asax is not created by default.
    >>
    >> Select "File", "New", "File", and select "Global Application Class"
    >> from the templates.
    >>
    >> Or, right-click the website's name in the Solution Explorer and select
    >> "Add new item" and select "Global Application Class" from the templates.
    >>
    >>
    >>
    >> Juan T. Llibre, ASP.NET MVP
    >> ASP.NET FAQ : http://asp.net.do/faq/
    >> Foros de ASP.NET en Español : http://asp.net.do/foros/
    >> ======================================
    >> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    >> news:...
    >>>I installed VS05 RC , created a new Web Site , but I do not see Global.asax , and I do
    >>>not see Global.asax.cs in the App_Code dir ......

    >>
    >>

    >
    >
    Juan T. Llibre, Oct 18, 2005
    #4
  5. John A Grandy

    Bruce Barker Guest

    because asp.net compiles all the source code now, not VS, so the extra file
    is not required.

    -- bruce (sqlwork.com)


    "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    news:O%...
    > Ok. I was able to do that. But apparently Global.asax.cs no longer exists
    > ... the various methods ( Application_Start , etc. ) instead show inline
    > in Global.asax ...
    >
    > Why did they do this ?
    >
    >
    > "Juan T. Llibre" <> wrote in message
    > news:%...
    >>A global.asax is not created by default.
    >>
    >> Select "File", "New", "File", and select "Global Application Class"
    >> from the templates.
    >>
    >> Or, right-click the website's name in the Solution Explorer and select
    >> "Add new item" and select "Global Application Class" from the templates.
    >>
    >>
    >>
    >> Juan T. Llibre, ASP.NET MVP
    >> ASP.NET FAQ : http://asp.net.do/faq/
    >> Foros de ASP.NET en Español : http://asp.net.do/foros/
    >> ======================================
    >> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    >> news:...
    >>>I installed VS05 RC , created a new Web Site , but I do not see
    >>>Global.asax , and I do not see Global.asax.cs in the App_Code dir ......

    >>
    >>

    >
    >
    Bruce Barker, Oct 18, 2005
    #5
  6. John A Grandy

    Visveswaraiah

    Joined:
    Jun 13, 2009
    Messages:
    1
    Global.asax not published to IIS

    I have created a web site in ASP.Net 2.0, as you told in previous message in this post i have added global.asax page and writen code in it. If i run the web site it is working fine.

    I publish the site is IIS, global.asax is not working in publshed site, i saw there is no global.asax in published code in IIS. I manually copied global.asax to the published location, still it is not working.

    Kindly some one help me please.
    Visveswaraiah, Jun 13, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    804
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  2. Ben Fidge
    Replies:
    0
    Views:
    1,814
    Ben Fidge
    Feb 26, 2006
  3. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,143
    Mark Rae
    May 23, 2006
  4. Nathan Sokalski

    Global.asax.vb in Visual Studio .NET 2005

    Nathan Sokalski, Jun 30, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    7,609
    Cor Ligthert [MVP]
    Jun 30, 2006
  5. Replies:
    1
    Views:
    351
    David R. Longnecker
    Oct 16, 2006
Loading...

Share This Page