Problem with global.asax
-
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)
-
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)
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