Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with global.asax

Problem with global.asax

Scheduled Pinned Locked Moved ASP.NET
csharpsysadmintoolshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AprNgp
    wrote on last edited by
    #1

    i want to re-write the url in global.asax so i wrote this code ...

    <%@ Application Language="C#" %>

    <script runat="server">

    void Application\_Start(object sender, EventArgs e) 
    {
        // Code that runs on application startup
    
    }
    
    void Application\_End(object sender, EventArgs e) 
    {
        //  Code that runs on application shutdown
    
    }
        
    void Application\_Error(object sender, EventArgs e) 
    { 
          
    }
    
    void Session\_Start(object sender, EventArgs e) 
    {
        // Code that runs when a new session is started
    
    }
    
    void Session\_End(object sender, EventArgs e) 
    {
        // Code that runs when a session ends. 
        // Note: The Session\_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer 
        // or SQLServer, the event is not raised.
    
    }
    void Application\_BeginRequest(object sender, EventArgs e)
    {
          **Context.RewritePath("~/UnderDevelopment.aspx");  **     
    }  
    

    </script>

    this is working fine ... on local host ... but as i deploy this on server, this simply doesn't work .... wat could be the problem .... ???

    Apurv “Never trust a computer you can’t throw out a window.” (Steve Wozniak) “There are only two industries that refer to their customers as ‘users’.” (Edward Tufte)

    P 1 Reply Last reply
    0
    • A AprNgp

      i want to re-write the url in global.asax so i wrote this code ...

      <%@ Application Language="C#" %>

      <script runat="server">

      void Application\_Start(object sender, EventArgs e) 
      {
          // Code that runs on application startup
      
      }
      
      void Application\_End(object sender, EventArgs e) 
      {
          //  Code that runs on application shutdown
      
      }
          
      void Application\_Error(object sender, EventArgs e) 
      { 
            
      }
      
      void Session\_Start(object sender, EventArgs e) 
      {
          // Code that runs when a new session is started
      
      }
      
      void Session\_End(object sender, EventArgs e) 
      {
          // Code that runs when a session ends. 
          // Note: The Session\_End event is raised only when the sessionstate mode
          // is set to InProc in the Web.config file. If session mode is set to StateServer 
          // or SQLServer, the event is not raised.
      
      }
      void Application\_BeginRequest(object sender, EventArgs e)
      {
            **Context.RewritePath("~/UnderDevelopment.aspx");  **     
      }  
      

      </script>

      this is working fine ... on local host ... but as i deploy this on server, this simply doesn't work .... wat could be the problem .... ???

      Apurv “Never trust a computer you can’t throw out a window.” (Steve Wozniak) “There are only two industries that refer to their customers as ‘users’.” (Edward Tufte)

      P Offline
      P Offline
      pthalacker
      wrote on last edited by
      #2

      I am having exactly the same problem and I can't seem to find an answer anywhere. If you find something please post back here and I will do the same. pamela

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups