I had to investigate a situation where a message of "Object moved to here", where "here" was a link, appeared in our ASP.Net application. First of all, we don't have that message in the app, it appears it is an internal message in ASP.Net, more exactly in HttpResponse.Redirect. It is a hardcoded HTML that is displayed as the response status code is set to 302 and the redirect location is set to the given URL. The browser is expected to move to the redirect location anyway, and the displayed message should be only a temporary thing. However, if the URL is empty, the browser does not go anywhere.

In conclusion, if you get to a webpage that has the following content:
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="[url]">here</a>.</h2>
</body></html>
then you are probably trying to Response.Redirect to an empty URL.

Comments

Siderite

This post is five years old. I remember that I looked in the decompiled .NET code and found the exception message and thus I have found the reason for the error. In my code (not Sharepoint) I indeed had a redirect to a value that in some cases was an empty string. If that is not so obvious in your code, try to look deeper into it and what it does in the background. I am afraid I can&#39;t give you more of an insight on this.

Siderite

Angel Lagos

Thanks Siderite, I was linking an item (which appeared to create successfully I may add but doesn&#39;t create a direct or relative link to the actual item) but I&#39;m wondering how or why this changed under the hood of SharePoint - never had to do that before, can you elaborate on how to do your suggestion and it&#39;s implications?

Angel Lagos

Siderite

The solution is in the post: don&#39;t do a Response.Redirect(&quot;&quot;)

Siderite

Angel Lagos

Did anyone solve this issue? I&#39;ve read MS&#39;s solution to enable anonymous authentication in IIS and Central Admin - which I&#39;ve verified it is in both locations just for grins but still have the issue on 2013 SharePoint.

Angel Lagos

crossword maker

there is a lot of headache because of redirection. thank you for covering this issue.

crossword maker

Post a comment