0

I 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?

3
  • What kind of site template you used? E.g. trying to create MySite Host in STANDALONE SharePoint could generate this error, as the UPSA does not get provisioned! Apr 25, 2012 at 11:51
  • @C.Marius It's default team site. But it's good point to start. Thanks
    – AlexSSE
    Apr 25, 2012 at 13:01
  • This sounds daft, but do you have a subsite called Test created? You didn't say so in your steps above.
    – James Love
    Aug 4, 2012 at 10:19

2 Answers 2

1

Are you getting any exception or it is a blank page? If it is a blank page try basic authentication for your default website. Go to IIS >Click on Sites> Click on your web application or SharePoint Central Administration site ( You will have to follow these steps for all the sharepoint web applications that you create in IIS)> Click on Authentication and enable Basic Authentication> Reset IIS

Now when you access your site it will ask for userid and password. Give proper userid and password.

1
  • Please read the question carefully before posting the answer.
    – AlexSSE
    Apr 26, 2012 at 8:31
0

The problem was in custom HttpModule and if to be more precise, in accessing SPContext while it was null. Thank you all for helping

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.