Wednesday, April 8, 2015

The Web application at https://myURL could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
!       at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
   at docMig.Utilities.iterateSubWebs(String sourceWebUrl)

  1. Ensure that the URL is correct
  2. Make sure that your account has Farm Administrator and Site Collection Administrator rights
  3. If your application is running outside SharePoint, please ensure to impersonate an account that has proper rights
SPUserToken userToken = web1.CurrentUser.UserToken;
SPSite s = new SPSite(sourceWebUrl, userToken);
using( SPWeb web = s.OpenWeb()){
}

4.If none of the above works; try the following steps
    • Grant db_owner access to content database
    • Grant db_owner access to configuration database

No comments:

Post a Comment