Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
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! –  C. Marius - MVP Apr 25 '12 at 11:51
    
@C.Marius It's default team site. But it's good point to start. Thanks –  AlexSSE Apr 25 '12 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 '12 at 10:19
add comment

2 Answers

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.

share|improve this answer
    
Please read the question carefully before posting the answer. –  AlexSSE Apr 26 '12 at 8:31
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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