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

<p>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't give you more of an insight on this.</p>

Siderite

Angel Lagos

<p>Thanks Siderite, I was linking an item (which appeared to create successfully I may add but doesn't create a direct or relative link to the actual item) but I'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's implications?</p>

Angel Lagos

Siderite

<p>The solution is in the post: don't do a Response.Redirect("")</p>

Siderite

Angel Lagos

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

Angel Lagos

crossword maker

<p>there is a lot of headache because of redirection.<br>thank you for covering this issue.</p>

crossword maker

crossword maker

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

crossword maker

Post a comment