none
Identify SharePoint 2010 exception

    Question


  • I've a problem with identifying the origin of the exception in SP 2010 Enterprise.

    Environment:

    • Standalone SP2010
    • AAM configured
    • Authentication: Claims based.
    • SSL enabled.

    Description:

    • New web application created.
    • New root site collection created and works correctly (https://www.MySite.com).

    Problem:

    • Any link which is located on the subsite (i.e. MySite\Test) leads to the exception.
    • Set permissions in MySite\Test shows:

    [ArgumentNullException: Value cannot be null.]
    Microsoft.SharePoint.SPSite.OpenWeb(String strUrl, Boolean requireExactUrl) +27675215
    Microsoft.SharePoint.SPSite.get_RootWeb() +39
    Microsoft.SharePoint.SPFeatureCollection.EnsureFeaturesData() +388
    Microsoft.SharePoint.SPFeatureCollection.get_Hash() +257
    Microsoft.SharePoint.Utilities.SPUtility.GetHashCodeForActiveFeatures(SPWeb spweb) +59 Microsoft.SharePoint.WebControls.SPRibbon..ctor() +113
    ASP.MYPORTAL_MASTER_55085331.__BuildControlSPRibbon1() in C:\inetpub\wwwroot\wss\VirtualDirectories\mysite.com80_catalogs\masterpage\MasterPage\Custom.master:67 ASP.MYPORTAL_MASTER_55085331.__BuildControlSPSecurityTrimmedControl2() in C:\inetpub\wwwroot\wss\VirtualDirectories\mysite.com80_catalogs\masterpage\MasterPage\Custom.master:62

    • More options in MySite\Test shows:

    [ArgumentNullException: Value cannot be null.]
    Microsoft.SharePoint.SPSite.OpenWeb(String strUrl, Boolean requireExactUrl) +27675215
    Microsoft.SharePoint.SPSite.get_RootWeb() +39
    Microsoft.SharePoint.SPFeatureCollection.EnsureFeaturesData() +388
    Microsoft.SharePoint.SPFeatureCollection.get_Count() +56
    Microsoft.SharePoint.SPFeatureCollectionEnumerator.System.Collections.IEnumerator.MoveNext() +58 Microsoft.SharePoint.SPElementProvider.AddElementsFromFeatures(SPFeatureCollection features, CultureInfo culture, SPWeb web, List`1 list) +566

    • Site Settings in in MySite\Test shows blank page.

    Reflector shows that ArgumentNullException is possible when strUrl is null

       public SPWeb OpenWeb(string strUrl, bool requireExactUrl) 
        { 
          if (strUrl == null) 
            throw new ArgumentNullException(); 
          if (this.IsValidWebUrl(strUrl)) 
            return new SPWeb(this, this.MakeFullUrl(strUrl), requireExactUrl); 
          throw new ArgumentException(SPResource.GetString("InvalidUrl", new object[1] 
          { 
            (object) strUrl 
          })); 
        } 
    

    Any ideas where to look further?

    Saturday, May 05, 2012 4:21 PM

Answers

  • It seems like the identity used to access the subsite doesn't have permissions to access the appropriate portions of the root site. Can you try giving all users "authenticated users" (as a test) access to the root site and see if you can then properly access the subsite?


    Doug Hemminger http://www.sharepointdoug.com

    Monday, May 07, 2012 1:49 PM

All replies

  • It seems like the identity used to access the subsite doesn't have permissions to access the appropriate portions of the root site. Can you try giving all users "authenticated users" (as a test) access to the root site and see if you can then properly access the subsite?


    Doug Hemminger http://www.sharepointdoug.com

    Monday, May 07, 2012 1:49 PM
  • Hi,

    Doug is correct on this.  It has something to do with the root level site.

    get_Rootweb() is  be passing a Null value to OpenWeb()

    Why get_Rootweb() is returning Null is unclear at this point.

    Also the file system name is showing as: C:\inetpub\wwwroot\wss\VirtualDirectories\mysite.com80

    Have you tested the root site with just regular HTTP instead of HTTPS?

    If you go through these same steps by opening the object model and running:

    $site = get-spsite https://mysite.com

    $site.get_RootWeb()

    See if that really returns a null.  Try the same with HTTP.


    Regards, Savoeurn Va Microsoft Online Community Support

    Tuesday, May 08, 2012 4:36 PM
  • Hi,

    I've tried the

    $site = get-spsite https://mysite.com
    $site.get_RootWeb()

    it returns correct URL

    however any created sub-site returns NULL (regardless that I do can navigate to it):

    $site = get-spsite https://mysite.com/test1
    $site.get_RootWeb()

    Error

    It seems that site is not created correctly. I've added All Users (MyMembershipProvider) to the Site Owners but this didn't help.

    Please advise what else can be done.


    Monday, May 28, 2012 3:57 PM
  • however any created sub-site returns NULL (regardless that I do can navigate to it):

    $site = get-spsite https://mysite.com/test1
    $site.get_RootWeb()

    Error

    It seems that site is not created correctly. I've added All Users (MyMembershipProvider) to the Site Owners but this didn't help.

    Please advise what else can be done.

    Get-SPSite gets Site collections. Get-SPWeb gets sites (sub sites).


    Jason Warren
    Infrastructure Specialist

    Monday, May 28, 2012 10:03 PM
  • Get-SPSite gets Site collections. Get-SPWeb gets sites (sub sites).

    Sorry, my bad. However the problem is still actual
    Tuesday, May 29, 2012 7:21 AM
  • Any chance you can show us what your AAM look like?

    Also, can you confirm that you do not have any extra managed paths configured for the web application? It doesn't appear so from the urls you are posting but I just want to check. You can confirm your managed paths by going to the web application settings in Central Administration and clicking on managed paths in the ribbon. You should just see the "(root)" in the "Included Paths" section. If you see any inclusions (like "sites"), let us know. You would need to include that when trying to access a subsite: http://www.mysite.com/sites/z4 for example

    Also, can you confirm that you are not using any host headers or A record pointers in DNS?


    Doug Hemminger http://www.sharepointdoug.com

    Wednesday, May 30, 2012 3:21 AM