How to mirror user access between Windows 2016 Servers

I’m setting up an intranet web server that will handle requests coming form multiple different types of employees.

One of the request that my server will need to handle is to query data from a second server. The second server is hosted by a different team and has restrictions as to who can access their server (using windows authentications – usedefaultcredentials). My server does have access to query the second web server.

For the requests that require my server to do the querying I would like a method to emulate the validation criteria set by this second server.

Is there a way to: 1. Forward the received request (or part of) to the second server to see if they validate the user? or 2. Send a new request to the second server to ask if this user is validated? or 3. Create a connection between the servers that will maintain the set of authorized users so that my server can validate the request. This would need to done via automation for there is no chance that I can add a recurring task to other teams workload (Manually informing us of which user is now listed or unlisted is not a feasible solution).

I can request the other team to do small changes but there can’t be any big overhaul. Also it can only be one way (my server can’t have any way to manage/change permissions on the second server).

People Search and User Profiles SP 2016

Tell me why this code does not work in SharePoint server 2016 on-premises, but is working 2013? Possible problem in another sourceId("B09A7990-05EA-4AF9-81EF-EDFAB16C4E31")???

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="/_layouts/15/sp.runtime.js" type="text/javascript"></script> <script src="/_layouts/15/sp.js" type="text/javascript"></script> <script src="/_layouts/15/sp.search.js" type="text/javascript"></script> <script src="/_layouts/15/sp.UserProfiles.js" type="text/javascript"></script>  <script type="text/javascript">     $  (document).ready(function () {          $  ("#btnSearch").click(function () {             users = [];             userProfileProperties = [];             SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getAllUsers);         });     });      var users = [];     var userProfileProperties = [];      //Method to fetch all the users     function getAllUsers() {          //Textbox value containing search term         var searchTerm = $  ("#txtSearchBox").val();         clientContext = new SP.ClientContext.get_current();         //Building Keyword query for the search         var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(clientContext);         keywordQuery.set_queryText(searchTerm);         keywordQuery.set_sourceId("B09A7990-05EA-4AF9-81EF-EDFAB16C4E31");         keywordQuery.set_rowLimit(500);         keywordQuery.set_trimDuplicates(false);         var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(clientContext);         results = searchExecutor.executeQuery(keywordQuery);         clientContext.executeQueryAsync(onQuerySuccess, onQueryError);      }     function onQueryError(sender, args) {         alert(args.get_message());     }     function onQuerySuccess() {         $  .each(results.m_value.ResultTables[0].ResultRows, function () {             users.push(this.AccountName);          });          fetchProfilePropertiesForUsers();     }      function fetchProfilePropertiesForUsers() {         var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);         var profilePropertyNames = ["PreferredName", "PictureURL", "AboutMe", "TechNetProfile", "AccountName"];          for (var i = 0; i < users.length; i++) {             var userProfilePropertiesForUser = new SP.UserProfiles.UserProfilePropertiesForUser(clientContext, users[i], profilePropertyNames);             userProfileProperties[i] = peopleManager.getUserProfilePropertiesFor(userProfilePropertiesForUser);         }         clientContext.executeQueryAsync(onSuccess, onQueryError);     }      function onSuccess() {         var html = "<style type='text/css'> .floatL {float:left;margin:10px;} .floatR {padding-top:10px} .profile {padding:10px 10px;} .editProfile{margin-left:100px;}  div>img {height:72px;width:72px;} </style>";         for (var i = 0; i < userProfileProperties.length; i++) {             html += "<div class='profile'><div class='floatL'><img src='" + userProfileProperties[i][1] + "' href='#' /></div><div class='floatR'><h2><span>" + userProfileProperties[i][0] + "</span></h2><span>About Me : " + userProfileProperties[i][2] + "</span><br /><span>TechNet Profile : </span><a href='" + userProfileProperties[i][3] + "'>" + userProfileProperties[i][3] + "</a><br /></div></div><br />";          }          $  ("#divUserProfiles").html(html);     } </script> <input type="text" id="txtSearchBox" /> <input id="btnSearch" type="button" value="Search Users" />  <div id="divUserProfiles"></div> 

Search not working properly – SP Enterprise 2016

I’ve created a new SP Enterprise 16 dev environment. I’ve run a crawl and everything seems to be indexing correctly via central administration. However, things will not populate in the site search, nor will the CSWP provide any results. For example, I have a photo library called “news and announcements photos” and if I change my query to search for images in that library, 0 results will populate. Can anyone give me an idea or references of what might be going on here? Thanks.

Search not working properly – SP Enterprise 2016

I’ve created a new SP Enterprise 16 dev environment. I’ve run a crawl and everything seems to be indexing correctly via central administration. However, things will not populate in the site search, nor will the CSWP provide any results. For example, I have a photo library called “news and announcements photos” and if I change my query to search for images in that library, 0 results will populate. Can anyone give me an idea or references of what might be going on here? Thanks.

SharePoint 2016 – Create Service Application timed out

We have a SharePoint 2016 environment setup which consists of following servers: 1. Wfe with distributed cache server 2. Application server 3. Search server 4. Database server

As part of installation we installed SharePoint 2016 prerequisites, then installed SharePoint 2016 binaries on all SharePoint servers, then ran SharePoint configuration wizard on all servers.

Now we need to create Service Applications as part of configuration, but none of the service application gets created successfully from UI or PowerShell. When we create Service Application from UI it takes long and then it give error: “Request timed out”. When we look at created service application in central admin, we can see the service application name with status stopped, no proxy gets created for the service application, database and the application pool does get created.

When we create service application using PowerShell then it takes 3-4 hours but the command to create service application does not complete. Even deleting the service application take 2-3 hours from PowerShell, from UI it just times out.

There are no errors related to this found in ULS logs or Event logs.

Any ideas what could be the issue here, why service applications are not getting created?

Thanks in advances, Anna

Update – Following errors appeared in ULS Logs when i again tried to create managed metadata service application and word automation service application

(Watson Reporting Cancelled) System.Threading.ThreadAbortException: Thread was being aborted.
at Microsoft.SharePoint.Administration.SPTimerJobAsyncResult.WaitForCompletion(Object state)
at Microsoft.SharePoint.Administration.SPTimerJobAsyncResult.End()
at Microsoft.SharePoint.Administration.SPServiceApplication.ProvisionInstances()
at Microsoft.SharePoint.Administration.SPIisWebServiceApplication.Provision()
at Microsoft.Office.ConversionServices.Service.ConversionServiceApplication.Provision()
at Microsoft.Office.Word.Server.Service.WordServiceApplication.Provision()

Timer ‘Word Automation Service’: Canceling execution because App ‘Word Automation Service’ is not online (Status=Provisioning)

MetadataWebServiceApplication ‘Managed Metadata Service’ create failed. Exception: System.Threading.ThreadAbortException: Thread was being aborted.
at Microsoft.SharePoint.Administration.SPTimerJobAsyncResult.WaitForCompletion(Object state)
at Microsoft.SharePoint.Administration.SPTimerJobAsyncResult.End()
at Microsoft.SharePoint.Administration.SPServiceApplication.ProvisionInstances()
at Microsoft.SharePoint.Administration.SPIisWebServiceApplication.Provision()
at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.Provision()
at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.UpdateData(String sharedAppName, SPIisWebServiceApplicationPool applicationPool, Boolean unpublishAllPackages, String hubUri, Boolean doSetErrorReport, Boolean isErrorReportEnabled, Boolean doProvision)
at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.Create(String sharedAppName, String databaseName, String databaseServer, String sqlAuthUserName, String sqlAuthPassword, String failoverServer, SPIisWebServiceApplicationPool applicationPool, String hubUriString, Boolean isErrorReportEnabled, Boolean isInDefaultAssociation, Boolean isPartitioned, Int32 cacheCheckInterval, Int32 maxChannelCache, Boolean forceProxyCreation, Boolean fDeferUpgradeActions)

MetadataWebServiceApplication ‘Managed Metadata Service’ unprovision started.

SharePoint 2010 to SharePoint 2016 Upgrade or Migrate

I am in the process of upgrading SharePoint 2010 to SharePoint 2016. What I’ve done so far is attach the SharePoint 2010 db into Sharepoint 2013 environment, completed the mount and upgrade. However, it looks horrible in SharePoint 2013. The company template, web parts are broken, etc. What are the benefits of upgrading vs. migrating? Is it better to redesign/build the site in SharePoint 2016 and use a third party tool to migrate the data? I haven’t looked at the workflows yet. Can Workflows and MySites be migrated or is that an upgrade?

Any recommendations, tips, best practices?

Thank you.

LINQ to SharePoint 2016 : Value does not fall within the expected range

I have a Dev and a Production SharePoint 2016 environment. For CRUD with lists I am using LINQ to SharePoint (SPMetal) generated classes. I have a list where 27 columns are Person Type. In my dev(http://sp2016/) environment the list is in root/main site but in Prod it is in subsite (https://sp2016/leaveauto). In both environment I have increased the Resource throttling value from 8 to 50 for Lookup View field. From the list I am taking a Person’s Id value (column name: HOD) from a specific Person type column with below code

using (MyDataContext objDataContext = new MyDataContext(_webUrl))                     {                         try                         {                             int approverId = objDataContext.ApproverInfo.FirstOrDefault(x => (string.Compare(x.DeptID,deptId)==0) && (string.Compare(x.Location, location)==0)).HODId;                         }                         catch (Exception ex)                         {                             throw;                         }                     } 

here, HODId is LINQ to SharePoint generated column for HOD and deptId & location values I am passing with parameter.

In Dev environment it is working fine, but in Prod it is giving below error

{System.ArgumentException: Value does not fall within the expected range.    at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)    at Microsoft.SharePoint.SPListItemCollection.GetColumnNumber(String groupName, Boolean bThrowException)    at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)    at Microsoft.SharePoint.SPListItem.get_Item(String fieldName)    at Microsoft.SharePoint.Linq.PropertyMap.GetSPFieldValue(PropertyMap pm, SPListItem item, JoinPath joinPath)    at Microsoft.SharePoint.Linq.SPItemMappingInfo.MaterializeEntity[TEntity](DataContext dc, SPDataList list, SPListItem item, SPItemMappingInfo itemMappingInfo, JoinPath joinPath)    at lambda_method(Closure , SPListItem )    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()    at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)    at Microsoft.SharePoint.Linq.SPLinqProvider.Execute[T](Expression expression)    at ShopSignboard.lib.Utility.FindNonFinancialApprover(String approvalStatus, String deptId, String location)} 

How can I solve this problem?

Custom endpoint failure after 2010 to 2016 migration

I’ve upgraded sharepoint 2010 app to 2016, it has 3 custom endpoints, and one of them is this one:

namespace AuthenticationWebService {     [BasicHttpBindingServiceMetadataExchangeEndpoint]     [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]     [ServiceContract]     public class AuthenticationService     {         [OperationContract]         [WebInvoke(Method = "POST",          BodyStyle = WebMessageBodyStyle.Wrapped,          ResponseFormat = WebMessageFormat.Json)]         public bool AuthenticateUser(string userName, string password)         {             return IsValidCredentials(userName, password);         }          internal static bool IsValidCredentials(string userName, string password)         {             bool isValid = false;              if (userName.IndexOf(@"\") > 0)             {                 userName = userName.Substring(userName.IndexOf(@"\") + 1);             }              string domain = SPContext.Current.Site.RootWeb.AllProperties["Authentication_Domain"].ToString();              using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, domain))             {                 isValid = pc.ValidateCredentials(userName, password);             }              return isValid;         }     } } 

Simple really, just authenticates user in a few forms in order to confirm given action. This code was written for 2010 Sharepoint, and migrated to 2016 via visual studio upgrade.

Problem is, I can’t seem to properly call this endpoint in 2016, the same requests that work in 2010 gives me “400 bad request” in 2016. Any ideas?