473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4179
"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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.