views:

39

answers:

3

Hi i have a asp.net webforms application which is a new version of an old webshop. I have a lot of inbound links from the Internet, that point to a particular category page: http://www.example.com/category1.html, the path to this category in the new setup is similar to: http://www.example.com/category.aspx?id=42.

I have setup the Category.aspx page to handle errors and redirect to a custom page, log the error and redirect to my front page.

I have setup the Global.asax Application_Error to do the same

I have setup the Web.config, with custom errors to relay 404 using the same concept as above.

Everything is working as it should in Visual Studio (the build in web server), when i publish it to my web host, it doesn't work, they say it is running in integrated mode... anyone got a solution to this?

Sincerely, Brian

Edit/Solution The IIS running in Integrated mode, so i finally found out that i couldnt handle this the way i did, i write a httphandler, registered it in the web.config and assigned it to intercept all calls made to *.html files. All i had to do was then to rediret to the proper source page.

A: 

Hi, Could you post the exact error message that you are getting? "Integrated Mode" sounds like security settings, rather than a 404 handling issue.

Thanks, Sam

Sam Huggill
A: 

With the build-in webserver, every request is handled as if it were an asp.net page, so your web.config is always used in that case.

In IIS however, .html is not handled by asp.net but by the static file handler, so the web.config is ignored (altough IIS7 looks at the web.config for some stuff, but that's not relevant for your problem)

So you need to either have .html handled by asp.net (set the .html extension to be handled by the same dll as the .aspx pages in IIS) or you should set the error-page in IIS (and not in your web.config).

Chris van de Steeg
A: 

Closed, please see my edit in the initial post for solution

H4mm3rHead