views:

59

answers:

1

I'm trying to use the Global.asax file in the root application of the website to catch requests for pdf files in the root that don't exist any more. I've configured iis to send pdf requests to asp.net. The whole thing works perfectly on development. It also works on the live system with missing .aspx pages, but not .pdf. Instead an "Error Code 64: Host not available". I'm using the Global.asax file to avoid the web.config and child applications (1.1 & 2.0) inheriting settings.

Any ideas or hints?

Edit:

I configured IIS to send .pdf requests to asp.net using the Application Configuration dialog on the mappings tab and adding .pdf extension mapped to the aspnet_isapi.dll. "Verify that file exists" is turned off (although I've also tried it turned on).

IIS version is 6

A: 

Remove the *.pdf MIME type and it should work.

Aliostad
There's no extensions defined for MIME Types
Steve Mc
How come? MIME type on windows is based on extension. I do not know about IIS 6 but in IIS 7 there is a screen where you modify the MIME types for your application. Also in the registry you have the MIME types which is based on file extensions.
Aliostad
@Aliostad - I found the window in IIS where the MIME types are defined and there are none defined.
Steve Mc
@Steve: Can't be?! There must be many defined as they are defined by default. For me there are at least 40 defined, including *.pdf. Did you select the root website and then go into the option?
Aliostad
@Aliostad - Ok I've had a look on the production server. They have two types defined (and one being .pdf). But the server I was testing on doesn't have any (completely blank). I've come up with a different work around anyway - but will look into the MIME thing a bit more later on if I can.
Steve Mc