2

i'm trying to handle “The resource cannot be found.” error 404 when there is a dot at the end of url in sharepoint 2010 site.

I found this link "The resource cannot be found." error when there is a "dot" at the end of the url , this link is talking about

<httpRuntime relaxedUrlToFileSystemMapping="true" /> which is supported only in .Net 4.0 but sharepoint 2010 is working with .Net 3.5 CLR 2.0 I tried also handling Application_PreSendRequestHeaders in global.asax but it didn't work , I tried also ' IIS URL Rewriting Module 2.0. ' but I don't know how to use it correctly is it an inbound rule or outbound rule ? .

any help please , Thanks .

Community
  • 1
  • 1
Mahmoud Farahat
  • 5,364
  • 4
  • 43
  • 59
  • 2
    Did you try using and httpmodule? Here you have a sample for url rewritting and redirection that might be useful http://www.thedotnotcorner.com/2012/06/07/sharepoint-2010-url-redirection-rewriting-using-httpmodule-for-anonymous-web-application/ – Gonzix Aug 22 '13 at 22:14
  • 1
    httpmodule and url rewriting rule didn't work , as mentioned here http://stackoverflow.com/a/5272936/188954 > When the resulting legalized path is not equal to the original path, processing stops and the ASP.NET code returns a 404 (it doesn't ask IIS or the web.config for the custom 404, it returns one itself, which makes it so hard to do something about this). – Mahmoud Farahat Aug 24 '13 at 14:22
  • 1
    That's weird, httpModules runs in a level that you should be able to catch the problem way before it rises an exception. Have you check if the httpmodule executes in other situations? – Gonzix Aug 24 '13 at 19:02
  • 4
    By the way, how come did you end up with a period at the end of an url? Are you dealing with clumsy content administrators? If so, better teach them how to use the product instead of adding layers of exception catching... – Gonzix Aug 24 '13 at 19:23

0 Answers0