Browse by Tags

All Tagsglobal.asax (RSS)
  • STUMPED: global.asax - Cannot change "Content-Type" response header

    I am completely unable to change the "Content-Type" response header from global.asax! This code should alter "Content-Type" and add a "Vary" header: void Application_PreSendRequestHeaders(Object sender, EventArgs e) { Response.ContentType = "application/xhtml+xml";...
    Posted to Forum by SLORider on 11-24-2008, 2:40 AM
  • Application.Error in Global.asax not being called for Error Code 404

    I have created a web application in which if requested page does not exists (error - 404), i redirect the user to centralized error page with following code in Application.Error event in global.asax //code start string strRequestedURLWithQueryString = ((System.Web.HttpApplication)(sender)).Request.Url...
    Posted to Forum by shurabhavesh on 10-01-2008, 3:28 AM
  • Re: 301 Redirect

    Quote: In Apache, I can upload an .htaccess file. What do I do in IIS? Solution - use a global.asax event to check the referring url and redirect to the "real" domain. I had the same problem and wrote up the solution in my blog (with code snippet) - http://www.demonzmedia.com/DemonzBlog/?p...
    Posted to Forum by demonzmedia on 09-18-2008, 12:20 AM
Page 1 of 1 (3 items)
Page view counter