spfx extensions – CORS and SP2019 on prem dev

I’m again trying my hands on some SPFx development on code downloaded from GitHub. As we are behind firewalls and they won’t open anything I have to use a local CDN for all my manifest files and what not.
Now some of the small devs i have done work fine but some of them i run into the CORS issue with the error below

enter image description here

Now one of the dev’s that i played with i did get to works with the below code as i did get some great help from this community

enter image description here

However when i try to do this on this latest dev below I can’t get it to work. Below is the full ts file and i just tried to enter the same code.

enter image description here

I’m a inhouse guy who got thrown into this because I like to tinker but I’m now in way over my head. If anyone has some time to help it would be great. The code that I started with for CORS is here

how to get Current date and time on to a SharePoint edit form SP2019

I have a request for one of my sites to make it so that a when a user opens the edit form the current datetime is displayed as part of one of the fields it the edit form.

Idea is the person who opens the edit form will copy this field called “Label” and paste it’s contents to print out a label.

Currently the “Label” field is a single line of text column that I have a workflow concatenating two existing fields (one single line of text, the other is a person/group) and I want to add the current datetime when the user opens the edit form, so it can be copied.

Form is currently not an info path from and I would prefer to keep it that way. Is this possible?


sharepoint server – OOS & SP2019 – Can’t open Excel files, other file formats works fine

I have the following:

  • SP2019 machine, custom, with build nr 16.0.10364.20001
  • OOS server, with the latest october CU patch

I’ve recently deployed the OOS to the SP machine, with no errors. The hosting/discovery works fine on both the machine and from a client computer.

When I go in to a Document library and create a Word file, PowerPoint, OneNote – it works perfectly well. But, when I try to create a Excel file, I get this error:

Sorry, something went wrong.
Could you please try that again?

Error Id: a6d5d757-3382-4e4b-83a6-6badfb5fcd15, 2020-10-30 15:33:28Z

When I look in the ULS logs, the things I could think of, that could be of relevance is this:

WOPI CheckFile - File Author is null for file xxx.xlsx with exception System.ArgumentNullException: Value cannot be null.  Parameter name: siteSubscription    
 at Microsoft.SharePoint.SPSiteSubscriptionSettings.GetSettings(SPSiteSubscription siteSubscription)    
 at Microsoft.SharePoint.SPTenantAdmin.CheckTenantLicenses(SPSiteSubscription siteSubscription, Boolean useCache, String() licenses)    
 at Microsoft.SharePoint.SoapServer.Wopi.RunCheckFileInternal(HttpContext context, CommonRequestData requestData, CommonResponseData responseData, String& responseMessage)

The Sharepoints Wopizone is set to internal-https. All the servers use a valid wild card cert from an authorized CA.

The WOPIZone looks like this:

PS C:Windowssystem32> Get-OfficeWebAppsFarm

FarmOU                                       :
InternalURL                                  : https://office.xxx.xx/
ExternalURL                                  :
AllowHTTP                                    : False
AllowOutboundHttp                            : False
SSLOffloaded                                 : False
CertificateName                              : STAR_xxx_2020-2022
S2SCertificateName                           :
EditingEnabled                               : True
LogLocation                                  : C:ProgramDataMicrosoftOfficeWebAppsDataLogsULS
LogRetentionInDays                           : 7
LogVerbosity                                 :
Proxy                                        :
CacheLocation                                : E:Cached
MaxMemoryCacheSizeInMB                       : 75
DocumentInfoCacheSize                        : 5000
CacheSizeInGB                                : 15
ClipartEnabled                               : False
OnlinePictureEnabled                         : False
OnlineVideoEnabled                           : False
MorphEnabled                                 : True
TranslationEnabled                           : False
MaxTranslationCharacterCount                 : 125000
TranslationServiceAppId                      :
TranslationServiceAddress                    :
RenderingLocalCacheLocation                  : E:Cachewaccache
RecycleActiveProcessCount                    : 5
AllowCEIP                                    : False
OfficeAddinEnabled                           : False
ExcelRequestDurationMax                      : 300
ExcelSessionTimeout                          : 450
ExcelWorkbookSizeMax                         : 30
ExcelPrivateBytesMax                         : -1
ExcelConnectionLifetime                      : 1800
ExcelExternalDataCacheLifetime               : 300
ExcelAllowExternalData                       : True
ExcelUseEffectiveUserName                    : False
ExcelWarnOnDataRefresh                       : True
ExcelUdfsAllowed                             : False
ExcelMemoryCacheThreshold                    : 85
ExcelUnusedObjectAgeMax                      : -1
ExcelCachingUnusedFiles                      : True
ExcelAbortOnRefreshOnOpenFail                : True
ExcelEnableCrossForestKerberosAuthentication : False
ExcelAutomaticVolatileFunctionCacheLifeTime  : 300
ExcelConcurrentDataRequestsPerSessionMax     : 5
ExcelDefaultWorkbookCalcMode                 : File
ExcelRestExternalDataEnabled                 : True
ExcelChartAndImageSizeMax                    : 1
OpenFromUrlEnabled                           : True
OpenFromUncEnabled                           : True
OpenFromUrlThrottlingEnabled                 : True
PicturePasteDisabled                         : False
RemovePersonalInformationFromLogs            : False
AllowHttpSecureStoreConnections              : False
Machines                                     : {xx-xxx10}

I Googled both, but I haven’t been able to find a solution yet… One thing i noticed:

In the error message that Excel Online gives, the timestamp is wrong by one hour. It seems the time zone is incorrect?

2019 – SP2019 – Load Balancing

I have SP2019 set up in MinRole topology ( x2 App w/search and x2 Web w/ DistCache ).

What’s the best way to load balance ? I am thinking of using the standard Windows Server NLB feature.

Do I only need to load balance the x2 Web Front End servers ? or do I also need to load balance the apps servers too ? My understanding is no, as that is handled within MinRole itself.

Other aside question; if my x2 Web w/dist cache servers are acting as the web servers, why do all of the app pools and sites appear on all servers within IIS including the app w/search servers ?

Thanks in advance!

2019 – How to convert spfx solution from SP online to SP2019?

I have built a webpart. During the question “Which baseline packages do you want to target for your component(s)?” I picked SP Online only mistakenly.

After I completed development and upload to APP Catalog, the App for SharePoint page show error “There were errors when validating the App manifest.: Xml Validation Exception: ‘The ‘IsDomainIsolated’ attribute is not declared.’ on line ‘1’, position ‘283’”.

I want to convert it to SP2019 use. Is there any procedure available for reference? I don’t want to re-build everything from scratch.

sharepoint server – SP2019 search is not working

Created brand new SharePoint 2019 Farm using AutoSpInstaller. In Central Administration, all Search services are showing green. But Search is not giving any results.

ULS log shows below messages:

  1. “All query processing components are in ‘Failed’ status.”

  2. “Query processing component ‘net.tcp:///QueryProcessingComponent1/ImsQueryInternal’
    changes its status to ‘Failed'”

Following steps are also carried out:

  1. Cleared Cache and rebooted servers (app and WFE).
  2. Checked all Search Application Services are running.
  3. Restarted Search Host Controller service.

    net stop OSearch16

    net start OSearch16

  4. Checked all Search services on App server running.
  5. Checked search TCP ports – 808, 32843, 32844.
  6. Reset index and re-crawled source. Showing success count in crawl log.

Any pointers will be appreciated.

sharepoint server – SP2019 Search not working

Created brand new SharePoint 2019 Farm using AutoSpInstaller. In central Administration all Search services are showing green. But Search is not giving any results.
ULS log shows “All query processing components are in ‘Failed’ status.” and “Query processing component ‘net.tcp:///QueryProcessingComponent1/ImsQueryInternal’ changes its status to ‘Failed'”

Following steps also done
1. Cleared Cache and rebooted servers (app and wfe)
2. Checked all Search Application Services are running
3. Restarted Search Host Controller service
net stop OSearch16
net start OSearch16
4. Checked all Search services on App server running
5. Checked search tcp ports 808, 32843, 32844
6. Reset index and re-crawled source. Showing success count in crawl log

Any pointers will be appreciated

sharepoint server – SP2019 OnPremise : Hard refresh is needed to reflect changes in customised Display Template

We are facing this issue on PROD. The latest version of the customized Display template is not reflected in the user browser both IE and chrome. Hard refresh resolves the issue. Both search result web part and content searh webpart have this issue. Variation is enabled on-site collection.

Blob cache is enabled with Max age = 1 year, We have yet not configured this to 24 hours due to performance reason

IIS reset, Blobcache flush and resetting object cache has not worked out.

Thanks in advance for your replies and suggestion