T
Thomas
in .net 1.1 we successfully use a HttpModule to catch 404 / 403.1 html
errors.
after migrating to .net 2.0, this modules is broken in a very, very strange
way.
we have defined a wildcard applicatio mapping to the .net 2.0 isapi dll:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
with "check if file exists" disabled.
the HttpModule "RedirectMissing" is called upon every request to the
webserver as predicted. but when an url to a non-existing file is called
(for example: http://test.local/missing.aspx), the http response status
(app.Response.StatusCode) _always_ 200 (= "OK"), even if the file doesn't
exist and a 404 would be the proper value. when using trace.axd, it also
shows 200 instead of the proper error code. IIS6 on the other hand sends the
proper error code back to the client.
now when one removes the wildcard mapping and load up the same url again,
the status code is 404 as it should be.
in .net 1.1, in both cases (with & without wildcard mapping) the status code
is always set to the proper values. there are no behaviour changes noted by
MS....
someone else ran into this problem? someone knows a workaround/solution?
this is a showstopper for our product ;-(
thanks,
thomas
(environment: IIS6, w2k3 sp1, .net 2.0, c#)
errors.
after migrating to .net 2.0, this modules is broken in a very, very strange
way.
we have defined a wildcard applicatio mapping to the .net 2.0 isapi dll:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
with "check if file exists" disabled.
the HttpModule "RedirectMissing" is called upon every request to the
webserver as predicted. but when an url to a non-existing file is called
(for example: http://test.local/missing.aspx), the http response status
(app.Response.StatusCode) _always_ 200 (= "OK"), even if the file doesn't
exist and a 404 would be the proper value. when using trace.axd, it also
shows 200 instead of the proper error code. IIS6 on the other hand sends the
proper error code back to the client.
now when one removes the wildcard mapping and load up the same url again,
the status code is 404 as it should be.
in .net 1.1, in both cases (with & without wildcard mapping) the status code
is always set to the proper values. there are no behaviour changes noted by
MS....
someone else ran into this problem? someone knows a workaround/solution?
this is a showstopper for our product ;-(
thanks,
thomas
(environment: IIS6, w2k3 sp1, .net 2.0, c#)