Migration of custom farm solution from SharePoint 2010 to SharePOint 2016 or 2019

As the support for SharePoint 2010 is ending, we are in a need to migrate custom farm solution (.wsp) from SP 2010 to SP 2016 or 2019. Can anyone let me know the things we need to consider before making such a change?

How to create an event handler to throw a javascript alert() when a document is uploaded to 2016 Sharepoint document library?

How to create an event handler to throw a JavaScript alert() when a document is uploaded to 2016 SharePoint document library? I would like the alert message to state the file name. This seems like it should be simple enough, but every where I look I need visual studio and need to know .NET.

sharepoint 2016 workflow error – SharePoint Stack Exchange

below is what the URL log is telling me my error is but i cant figure it out any help would be very much appreciated
Microsoft.Workflow.Client.InternalServerException: Exception thrown from the data layer. For more details, please see the server logs. HTTP headers received from the server - ActivityId: ec23db4e-541a-46d8-a4b9-10cfdb36cc3b. NodeId: SHAREPOINTSITE. Scope: /SharePoint/default/a59b336d-2b82-4a00-a7b8-2de1b84af71c. Client ActivityId : f255c49f-033a-c062-2721-4ee6b1171a38. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)    
at Microsoft.Workflow.Client.ClientHelpers.SendRequest(T)(HttpWebRequest request, T content)     -
-- End of inner exception stack trace ---    
at Microsoft.Workflow.Client.ClientHelpers.SendRequest(T)(HttpWebRequest request, T content)    
at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest(T)(HttpWebRequest request, T content)    
at Microsoft.Workflow.Client.ScopeManager.PublishScopeInternal(ScopeDescription description, String() pathSegments)    
at Microsoft.Workflow.Client.ScopeManager.PublishChildScope(String childScopeName, ScopeDescription description)    
at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.CreateServiceGroup(String scopeAddress, ScopeDescription serviceGroup)    
at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.CreateOrUpdateServiceGroup(SPWeb lookupWeb, SPAppPrincipal app) StackTrace: 
at Microsoft.Office.Server.Native.dll: (sig=5fa0e72f-c37c-49be-8b42-b95544077530|2|microsoft.office.server.native.pdb, offset=28719)
at Microsoft.Office.Server.Native.dll: (offset=2EAF6)```

windows server 2016 – How can Hyper-V failover be done without Active Directory

We are a small outfit, and I am running 4 webservers, 2 SQL servers, and a Reporting Server as VM’s in Hyper-V on WinServer2016 (datacentre edition). I want to be able to have a failover from this machine (Dell R620) to a copy of it. The servers are not on AD – I’m a dev wearing a Admin hat badly.

Is there something out there that can do this?

Already have replication running from (live) machine to (backup/failover) machine.
However, if stuff goes down, all info that was committed to sql databases since last replication would be lost, and this is the main problem.

I have no AD training at all, and the current setup is a mongrel that started as a BusinessServer2003, migrated to 2008 then to hybrid cloud based by previous employee that has left. I employed a tech thereafter for a period but fired him after he proved incompetent and in process of stealing source code. Sigh.

Not sure if this is do-able, but I want to attack the biggest headaches first.

SharePoint Server 2016: Event registration via SP calendar where user can save the event to their own calendar

My use case is: I have no knowledge of SharePoint development or coding (but I can follow instructions!). I want to create an event management system for managing our internal training – where attendees register/deregister for a course through the ‘SP training calendar’ and can easily save the event to their personal Outlook calendars (without having to manually fill in the event details in Outlook).

I understand that we need the following to have the calendar and the attendees list, but i can’t work out how to allow users to add it to their calendar (is it even possible?)

  • One Calendar List, editable by an administrator (can add/edit/delete events), viewable by attendees (they should just view the details and have the ability to register/unregister).

  • One attendee list for every created event (don’t know if this is best practice, other suggestions would be highly appreciated).

Thank you in advance!

Getting errors on SPFx hello world web part in SharePoint 2016 referencing a “strings” file

I am trying to get a hello world web part to work in SharePoint 2016.

I believe the SharePoint server has Feature Pack 2 installed as I see that KB4484255 (version 16.0.4966.100) shows as installed which is the February 2020 update.

enter image description here

My understanding is that I need KB4092459 (version 16.0.474.1000), but that the more recent update above is a cumulative update. However, I’m not certain of that, so maybe that’s where I have things wrong.

My dev environment looks like:

  • node v6.10.3 (using nvm)
  • @microsoft/generator-sharepoint@1.1.0 (globally installed)
  • npm@3.10.10 (globally installed)
  • yo@1.8.5 (globally installed)

I chose no JavaScript framework and just used the code out of the box. The web part works in the workbench. I made no code changes after running the Yeoman generator other than updating the write-manifests.json file to have a URL to my cdnBasePath set to an Azure container URL. I also updated deploy-azure-storage.json, but that doesn’t appear to be working as I manually copied the resulting dist files to the container. The dist files are:

  • 7be2dcde-e1b3-4643-804f-26a2458ca04f.manifest.json
  • hello-world.bundle.js
  • hello-world.bundle.js.map

I did a “bundle –ship” and “package-solution –ship”. And uploaded the sppkg file to my SP2016 app catalog. It showed Yes for Enabled, Valid App Package, and Deployed in the app catalog.

I added the app to my test site. It took several minutes for that to complete. I tried manually running the App Installation Service timer job from Central Admin hoping it would help (I don’t know if it did).

I created a test page and tried to add the web part. I looked for the web part under the “Under Development” category and it was not there. A couple of hours later I deployed a totally different hello world web part (different name and description – created via the Yeoman generator) and then this web part finally showed up in the “Under Development” category. I don’t know if one triggered the other.

Upon adding the web part to the page I get an error:

***ERROR MESSAGE:
***Failed to load component “7be2dcde-e1b3-4643-804f-26a2458ca04f” (HelloWorldWebPart). Original error: ***Failed to load URL
‘https://.blob.core.windows.net/helloworld-webpart/helloworld-webpart-helloworldstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js’
for resource ‘helloWorldStrings’ in component
‘7be2dcde-e1b3-4643-804f-26a2458ca04f’ (HelloWorldWebPart). There was
a network problem. This may be a problem with a HTTPS certificate.
Make sure you have the right certificate.

I don’t have a helloworld-webpart-helloworldstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js file in my dist folder. Any idea how I should generate it or otherwise fix this issue?

UPDATE:

I have also tried the same thing using the following for my dev environment:

  • node v8.17.0 (using nvm)
  • @microsoft/generator-sharepoint@1.9.1 (globally installed)
  • npm@3.10.10 (globally installed)
  • windows-build-tools@5.2.2 (globally installed)
  • yo@1.8.5 (globally installed)

I don’t know if the build tools are required. I get the same error as my first environment further above looking for a strings file.

SharePoint 2016 On Premise NewForm Error with Designer

I am using SharePoint 2016 On Premises. I am currently unable to use SharePoint Designer to create any custom form (NewForm, EditForm, DispForm). If I try I get the following error (Could not Save the list changes to the server). That is the only error I get, nothing in the SharePoint logs. I have read that this has been removed from SharePoint Online but I am using SharePoint On Premises. Is it possible that this removal has affected my on premise setup? If so how do I get it back? Thanks.

2016 – Users can no longer save changes to files in SharePoint

Please forgive, new in this section and trying to resolve an issue, as an admin with limited access.

  1. User can view a list of documents on a site.
  2. User can open MS document
  3. User can edit MS document
  4. User saves document, but changes are not being saved

Reviewed all the groups that the user has permissions for site access, and the system should behave so that the user receives the most highest permission.

Contribute, Limited Access is appearing.

Attempt was made to disable the property Limited Access but admin permission enabled for my user would not permit it. MS SharePoint Site Collection Features. Viewing the Site Administration Collection is not available.

I feel that this is the culprit. Is that correct?

Searched for how to review Audit Logs to determine how the system was affected, but I do not have access to the Audit Logs, which is under Site Administration Collection. This system is powerful but can be a nightmare if too many hands are in the pot.

sql server 2016 – Ola Hallengren IndexOptimize not rebuilding indexes and entering a loop (yes, table is over 1000 pages)

Ola’s script is not doing anything in our databases in regard to index rebuild.
This is the tsql:

EXECUTE IndexOptimize
@Databases = 'ReportServer',
@FragmentationLow = 'INDEX_REBUILD_OFFLINE',
@FragmentationMedium = 'INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 10,
@FragmentationLevel2 = 50,
@MinNumberOfPages = 1000,
@Resumable = 'Y',
@TimeLimit = 14400,
@MaxDOP = 1

and this is the procedure output:

Date and time: 2021-04-30 03:02:32
Server: C2-SQL1
Version: 14.0.3370.1
Edition: Standard Edition (64-bit)
Platform: Windows
Procedure: (MAS).(dbo).(IndexOptimize)
Parameters: @Databases = 'ReportServer', @FragmentationLow = 'INDEX_REBUILD_OFFLINE', @FragmentationMedium = 'INDEX_REBUILD_OFFLINE', @FragmentationHigh = 'INDEX_REBUILD_OFFLINE', @FragmentationLevel1 = 10, @FragmentationLevel2 = 50, @MinNumberOfPages = 1000, @MaxNumberOfPages = NULL, @SortInTempdb = 'N', @MaxDOP = 1, @FillFactor = NULL, @PadIndex = NULL, @LOBCompaction = 'Y', @UpdateStatistics = NULL, @OnlyModifiedStatistics = 'N', @StatisticsModificationLevel = NULL, @StatisticsSample = NULL, @StatisticsResample = 'N', @PartitionLevel = 'Y', @MSShippedObjects = 'N', @Indexes = NULL, @TimeLimit = 14400, @Delay = NULL, @WaitAtLowPriorityMaxDuration = NULL, @WaitAtLowPriorityAbortAfterWait = NULL, @Resumable = 'Y', @AvailabilityGroups = NULL, @LockTimeout = NULL, @LockMessageSeverity = 16, @StringDelimiter = ',', @DatabaseOrder = NULL, @DatabasesInParallel = 'N', @ExecuteAsUser = NULL, @LogToTable = 'N', @Execute = 'Y'
Version: 2020-12-31 18:58:56
Source: https://ola.hallengren.com
    
Date and time: 2021-04-30 03:02:32
Database: (ReportServer)
State: ONLINE
Standby: No
Updateability: READ_WRITE
User access: MULTI_USER
Recovery model: FULL
Is accessible: Yes
    
Date and time: 2021-04-30 03:02:33
Database context: (ReportServer)
Command: ALTER INDEX (PK_Segment) ON (dbo).(Segment) REBUILD WITH (SORT_IN_TEMPDB = OFF, ONLINE = OFF, MAXDOP = 1)
Comment: ObjectType: Table, IndexType: Clustered, ImageText: No, NewLOB: Yes, FileStream: No, ColumnStore: No, Computed: No, Timestamp: No, AllowPageLocks: Yes, PageCount: 2758, Fragmentation: 0
Outcome: Succeeded
Duration: 00:00:03
Date and time: 2021-04-30 03:02:36
    
Date and time: 2021-04-30 03:02:36

The issues are:

  • there are other indexes in another table (with ~34000 pages) with 50,60,97% of fragmentation (according to sys.dm_db_index_physical_stats) which are being completely ignored by the procedure
  • if the same tsql above is executed multiple times, the output is the same: it always try to rebuild the same clustered index PK_Segment, which has 0% fragmentation (after a manual Rebuild using SSMS)
  • secondly, it’s ignoring the Resumable parameter as it can’t be seen in the ALTER INDEX options list

There you have it. Basically all our databases have indexes with 97% fragmentation because the procedure is not doing anything.

This is an Azure SQL VM with SQL Server Standard (which is not supposed to support online rebuilds, hence the above’s offline options).

What’s Ola’s secret here? Any insights?

Much obliged.

How to use Yeoman Generator to generate a SharePoint 2016 SPFx web part (without errors)

I need to create an SPFx web part for SharePoint 2016. I have been following the instructions here but am getting an error when running “yo @microsoft/sharepoint”.

I know that versions of packages really matter, so let me describe those:

  • node v8.17.0 (using nvm)
  • @microsoft/generator-sharepoint@1.0.2 (globally installed)
  • gulp@3.9.1 (globally installed)
  • npm@3.10.10 (globally installed)
  • yo@2.0.0 (globally installed)

After having trouble the first time, I tried my best to replicate everything Vesa had in the video at the link further above. Everything is exactly as his versions show except he doesn’t mention his version of node. I read that it had to be 8.x for SP2016 web parts, so I chose the latest 8.x version (8.17.0).

Getting npm to use 3.10.10 was actually a little bit of work best described here.

When running “yo @microsoft/sharepoint” I chose “No JavaScript web framework” just to keep things simple (although I want React). The first error I get is the following (there are a few other errors after this one).

Downloading binary from
https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node
Cannot download
“https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node”:

HTTP error 404 Not Found

Going to that web page they clearly don’t keep versions that old. Is there any recommended set of versions for node and npm packages I should use? Are there workarounds I should be using instead to fix this specific issue?

For attempt #2 (I’ll call it #2, but I really tried a few before the one above), I went up to 1.1 on SPFx:

  • node v8.17.0 (using nvm)
  • @microsoft/generator-sharepoint@1.1.0 (globally installed)
  • gulp@3.9.1 (globally installed)
  • npm@3.10.10 (globally installed)
  • yo@2.0.0 (globally installed)

I got the same initial error as attempt #1 (I didn’t look to see if the errors after that matched).

For attempt #3 I went down to 6.x on node:

  • node v6.17.1 (using nvm)
  • @microsoft/generator-sharepoint@1.1.0 (globally installed)
  • gulp@3.9.1 (globally installed)
  • npm@3.10.10 (globally installed)
  • yo@2.0.0 (globally installed)

This time the error (and only output) for “yo @microsoft/sharepoint” was:

C:UsersKirkAppDataRoamingnvmv6.17.1node_modulesyonode_modulesyeoman-environmentlibenvironment.js:154
      options = {singleResult: !options.multiple, ...options};
                                                  ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:UsersKirkAppDataRoamingnvmv6.17.1node_modulesyolibrouter.js:9:54)