w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Custom 404 page based on dynamic Url - Server.Transfer throwing error transferring to dynamic page

You can't point Server.Transfer to a static page. You'll need to point it at a .aspx page to get it to work.

If you really want to use an HTML page, you'll need to open the HTML file, read its contents, cache it and use Response.Write to output it while persisting the 404 response header.

See: http://support.microsoft.com/kb/320439

Microsoft Internet Information Services (IIS) dispatches the Server.Transfer or the Server.Execute request to the appropriate Internet Server Application Programming Interface (ISAPI) extension based on the extension of the requesting file. For example, a request for an .aspx page is dispatched to the Aspnet_isapi.dll ISAPI extension.

After the request is dispatched to appropriate ISAPI extension, the ISAPI extension cannot call another ISAPI extension. You receive the error message that is listed in the "Symptoms" section because the Aspnet_isapi.dll file, which handles requests to ASP.NET pages, cannot forward the request to the Asp.dll file, which handles requests to ASP pages.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.