Try our conversational search powered by Generative AI!

Incorrect Link Error

Vote:
 

In my application I have setup ASP.net CustomError page for broken and faulty urls. This works fine on my development machine. But when i tries to access a faulty url receives below mentioned error on other environment.

Incorrect link

The link you gave does not work, either because the page it points to has been deleted or moved. If you clicked on a link, please inform the site’s webmaster that the link is faulty.

Please someone help me in this regard.

#59952
Jul 06, 2012 10:25
Vote:
 

If you are building something from scratch I would suggest Googling episerver dynamic 404 and follow one of the existing solutions others have shared.

If you already have a lot built I assume your custom error page is a EPiServer page.

You need to set it's templates's CurrentPage to a page that exits. Basically:

protected override void OnPreInit(EventArgs e)
{
            base.OnPreInit(e);
            CurrentPage = DataFactory.Instance.GetPage(your error page id from some setting);
}

    

#59955
Jul 06, 2012 11:19
Vote:
 

Hi Johan

I tried adding the below into my error page

 CurrentPage = EPiServer.DataFactory.Instance.GetPage(((PageReference)CurrentPage["CustomErrorPage"]));

but still it gives me the same error when trying to browse from other machines.

 

#59967
Jul 06, 2012 17:51
Vote:
 

In EPiServer.config (or web.config if an earlier version of EPiServer), make sure that globalErrorHandling = "Off" in the siteSettings-tag.

#59976
Jul 09, 2012 8:50
Vote:
 

Hi Erik

Tried changing globalErrorHandling = "Off" but still doesnt work on other environments except development.

#60059
Jul 12, 2012 15:11
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.