I am trying to get a handle on Relate+ (my first EpiServer dev), I have started by changing the start page to the layout that I require however there's a few controls that I don't need.When I try to remove them I get "Object reference not set to an instance of an object. Server Error in '/' Application."
This is what I did, what am I missing?
Removed from start.aspx
<%@ Register TagPrefix="RelatePlus" TagName="ArticlesList" src="~/Templates/RelatePlus/UserControls/ArticleUserControls/ArticleList.ascx" %>
<RelatePlus:ArticlesList ID="ucArticleList" runat="server" />
Removed from start.aspx.cs
Removed from start.aspx.designer.cs
protected global::EPiServer.Templates.RelatePlus.UserControls.ArticleUserControls.ArticleList ucArticleList;
Thanks a lot
That should work. I also verified that it did with my local installation of Relate+ and it did. So my guess is that something else is wrong.
Does the error message say anything else?
and yet, I am getting an error...
Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[NullReferenceException: Object reference not set to an instance of an object.] EPiServer.Templates.RelatePlus.Pages.Start.OnLoad(EventArgs e) +305 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
I have also done this and I don't get any errors. Are you sure you have not changed anything else that can cause this behavior?
Could you try running it in debug mode and see if you can get some more information on the error?
Best regards,Tom Stenius
It's seems like you were using the wrong type of project; Web Site instead of Web Application. Hopefully it will do the trick to change this!