473,327 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

global.asax issue

Tem
I've been stuck on this error for days.
I use global.asax to do url rewrite. which works fine on one server but not
the other. they are both windows server 2003 R2 IIS6.

if I do
http://test.com/photo/123
which would rewrite to http://test.com/photo/default.aspx?photo=123

on the server that doesn't work, it gives me a 404 error

but if I go and create a 123 folder under photo and a blank default.aspx, it
would work and display the correct page.
so this means global.asax is not being triggered

There must be a setting somewhere
Please help

Tem

Jan 23 '08 #1
5 1141
"Tem" <te*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I've been stuck on this error for days.
I use global.asax to do url rewrite. which works fine on one server but
not the other. they are both windows server 2003 R2 IIS6.

if I do
http://test.com/photo/123
which would rewrite to http://test.com/photo/default.aspx?photo=123

on the server that doesn't work, it gives me a 404 error

but if I go and create a 123 folder under photo and a blank default.aspx,
it would work and display the correct page.
so this means global.asax is not being triggered

There must be a setting somewhere
Please help
Make sure the folder the global.asax is sitting in is configured as an
application in IIS, and that there is a web.config in the folder with it.

Jan 23 '08 #2


"Leon Mayne" <le**@rmvme.mvps.orgwrote in message
news:FA**********************************@microsof t.com...
"Tem" <te*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I've been stuck on this error for days.
I use global.asax to do url rewrite. which works fine on one server but
not the other. they are both windows server 2003 R2 IIS6.

if I do
http://test.com/photo/123
which would rewrite to http://test.com/photo/default.aspx?photo=123

on the server that doesn't work, it gives me a 404 error

but if I go and create a 123 folder under photo and a blank default.aspx,
it would work and display the correct page.
so this means global.asax is not being triggered

There must be a setting somewhere
Please help

Make sure the folder the global.asax is sitting in is configured as an
application in IIS, and that there is a web.config in the folder with it.
Check IIS Configuration settings and check that IIS isn't checking for
existence of the page!!!!

I don't know how to do for a page without extension like yours, but if you
map something like "123.do" and check the extension ".do" configuration in
IIS -Properties -Applcation Configuration -mappings ... you'll find a
checkbox "Check that file exists" in your ".do" mapping configuration.

HTH
--
Gianluca Gravina
http://blogs.ugidotnet.org/thinkingingrava

Jan 23 '08 #3

>
http://test.com/photo123.aspx

which would rewrite to...

http://test.com/photo/default.aspx?photo=123

That would be fairly easy, and should work without problem.
You have to Check again that you haven't the checkBox "Check that file
exists" checked in iis mapping configuration. I had same problems with
Monorail Deployment in production environment !

HTH
--
Gianluca Gravina
http://blogs.ugidotnet.org/thinkingingrava

Jan 23 '08 #4


"Tem" wrote:
I've been stuck on this error for days.
I use global.asax to do url rewrite. which works fine on one server but not
the other. they are both windows server 2003 R2 IIS6.

if I do
http://test.com/photo/123
which would rewrite to http://test.com/photo/default.aspx?photo=123

on the server that doesn't work, it gives me a 404 error

but if I go and create a 123 folder under photo and a blank default.aspx, it
would work and display the correct page.
so this means global.asax is not being triggered

There must be a setting somewhere
Please help

Tem
If your problem is to redirect extensionless urls, check
http://msmvps.com/blogs/omar/archive...d-mapping.aspx
Jan 23 '08 #5
Tem
"check file exists" is turn off for .aspx which is the default setting

"grava" <g_*******@hotmail.comwrote in message
news:B8**********************************@microsof t.com...
>

"Leon Mayne" <le**@rmvme.mvps.orgwrote in message
news:FA**********************************@microsof t.com...
>"Tem" <te*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>I've been stuck on this error for days.
I use global.asax to do url rewrite. which works fine on one server but
not the other. they are both windows server 2003 R2 IIS6.

if I do
http://test.com/photo/123
which would rewrite to http://test.com/photo/default.aspx?photo=123

on the server that doesn't work, it gives me a 404 error

but if I go and create a 123 folder under photo and a blank
default.aspx, it would work and display the correct page.
so this means global.asax is not being triggered

There must be a setting somewhere
Please help

Make sure the folder the global.asax is sitting in is configured as an
application in IIS, and that there is a web.config in the folder with it.

Check IIS Configuration settings and check that IIS isn't checking for
existence of the page!!!!

I don't know how to do for a page without extension like yours, but if you
map something like "123.do" and check the extension ".do" configuration in
IIS -Properties -Applcation Configuration -mappings ... you'll find
a checkbox "Check that file exists" in your ".do" mapping configuration.

HTH
--
Gianluca Gravina
http://blogs.ugidotnet.org/thinkingingrava
Jan 23 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
7
by: Ankit Aneja | last post by:
I put the code for url rewrite in my Application_BeginRequest on global.ascx some .aspx pages are in root ,some in folder named admin and some in folder named user aspx pages which are in user...
0
by: hynek.cihlar | last post by:
A strange behaviour thatI found in ASP.NET 2.0. I am trying to issue a callback request (handled by ICallbackEventHandler and RaiseCallbackEvent) and a regular GET request in the client browser...
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
4
by: Hardy Wang | last post by:
Hi all, In order to solve code-behind of global.asax problem, I removed the code from global.asax, and just leave one line "<%@ Application Language="C#" Inherits="Global"%>" in this file. Then I...
1
by: ttt.tas | last post by:
hi all, i'm using asp .net v1.1, when i publish my application on the server using xcopy, i find that the global.asax file is still there, shouldn't it be compiled and assembled?? what if i...
8
by: Victor | last post by:
Can I get the events in GLOBAL.ASAX to fire if a classic ASP page is being accessed by the user?
4
by: Joe | last post by:
Hello all! I added a Global.asax to my application. I'm using the Application_BeginRequest event. Everything works fine in my development enviorment but when I publish the web site the...
3
by: Peter Larsen [CPH] | last post by:
Hi, I have a problem where the code in Global.asax.cs runs before the unittests (on test of course). In the global file, i load some data from a Oracle table and save it in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.