+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Don't Show Home or default.aspx on root

Don't Show Home or default.aspx on root

9 posts, 0 answered
  1. Dale Overton
    Dale Overton avatar
    9 posts
    Registered:
    13 Jan 2010
    13 Jan 2010
    Link to this post
    All.  Using SF 3.6.  I want my users to go to www.mysite.com and to see the URL as www.mysite.com.  However, right now when they do this they get www.mysite.com/home.aspx.  OR, if I name the page default.aspx they will get www.mysite.com/default.aspx.  Here is what I have tried to do....

    A)  set the redirectToHomePage="false" in web.config on <cms> element
    B)  Remove all default page references in IIS for home.aspx and default.aspx
    C)  Setup a wildcard script map in IIS for .* pointed to the aspnet_isapi.dll
    D)  Create a physical file for default.aspx and home.aspx.

    Note, when I do D it just pulls up those aspx files, which of course are blank. 

    Note, I can make these work when I am doing this for anything other than the root directory.  So if I wanted www.mysite.com/about/about.aspx to display as www.mysite.com/about/ I have been able to make that work using steps A, B, and C.  BUT, I cannot get it to work for the root directory.

    I've almost pulled all of my hair out, anyone help before I pull the rest out?

    Thanks,

    Dale
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Jan 2010
    Link to this post
    Hi Dale Overton,

    Thank you for using our services.

    Could you please revert all changes you have made so far an try the following:

    1) Set a home page for your Sitefinity website through Sitefinity Administration.
    2) Lets say that your home page is called ~/home.aspx
    3) Go to IIS and add a default document for the home.aspx (as in attached image).
    4) Create an empty home.aspx physical page in the root of your website. Just as Default.aspx when you create a new project.

    This should be enough.

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Darren du Preez
    Darren du Preez avatar
    6 posts
    Registered:
    18 Feb 2010
    19 Feb 2010
    Link to this post
    Hi, I am currently new to Sitefinity and have the following issue. I apologise if this is not the correct procedure in posting as well but I am having an issue in getting the set home page to work correctly.

    I have added the defaultdocument page to the same name as that of the home.aspx page created in Sitefinity in IIs. I have also added the "redirectToHomePage=false" in my web.config file. When I start my site I get the following 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.
      
    Source Error: 
      
      
    Line 30:     {
    Line 31: 
    Line 32:           if (context.User.Identity.IsAuthenticated == false && node.Title.Equals("Registration", StringComparison.OrdinalIgnoreCase))
    Line 33:             return true;
    Line 34: 
      

    This code is located in:
    public class RentaroomSitefinityCustomSiteMapProvider : CmsSiteMapProvider  
    {
        public RentaroomSitefinityCustomSiteMapProvider()
        {
            //
            // TODO: Add constructor logic here
            //
        }
      
            public override bool IsAccessibleToUser(HttpContext context, SiteMapNode node)
        {
      
              if (context.User.Identity.IsAuthenticated == false && node.Title.Equals("Registration", StringComparison.OrdinalIgnoreCase))
                return true;
      
              else if (context.User.Identity.IsAuthenticated == false && node.Title.Equals("Profile", StringComparison.OrdinalIgnoreCase))
                return false;
      
              else if (context.User.Identity.IsAuthenticated == true && node.Title.Equals("Registration", StringComparison.OrdinalIgnoreCase))
                return false;
              return base.IsAccessibleToUser(context, node);       
        }

    Help will be appreciated. If there is anything else that I must do or supply please let me know.

    Thanks,
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    19 Feb 2010
    Link to this post
    Hi Darren du Preez,

    Thank you for using our services.

    This error you are getting is because either the HttpContext.Current.User is null or the node variable is. I suggest you break point this line and debug to see which variable is throwing a null value.

    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Hanadi
    Hanadi avatar
    6 posts
    Registered:
    17 Jan 2008
    28 Aug 2010
    Link to this post
    Tried this solution but is not working for me. Site root always goes to Home.aspx
    Thanks
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Aug 2010
    Link to this post
    Hi Hanadi,

    Could you tell which solution does not work, because the error that we see is null reference exception is a custom code which does not contains check for nulls?

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Nadya
    Nadya avatar
    52 posts
    Registered:
    17 Dec 2008
    02 Sep 2010
    Link to this post
    Hi Telerik Team,

    I have similar questin, I am using Sitefinity 3.7 SP3 and I have same problem, except that I have set the urls to be extensionless so now instead of http://www.mysite.com I have http://www.mysite.com/default. I have added a document named default and I have the Default.aspx that comes with the project template. I have added wildcard mapping, but may be there is something else for the extensionless urls case?

    Thank you!
    Cheers, Nadya
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Sep 2010
    Link to this post
    Hello Nadya,

    If redirectToHomePage is set to false you should not see the default home page ( the page should be marked as home in Sitefintiy). Extensionless url does not affect this behavior. I attached a sample video.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Greg
    Greg avatar
    1 posts
    Registered:
    03 Oct 2015
    02 Nov 2015
    Link to this post
    Hosting Sitefinity with IIS is extremely difficult for some reason.  I haven't seen concrete documentation on how to set it up.  It appears most admins need to post forum questions to get things fixed.
Register for webinar
9 posts, 0 answered