This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
Recently you have reconfigured your environment to move from HTTP over to HTTPS. During this process you have gone through the necessary configuration steps and see that both K2 and SharePoint are functioning. However, on some of your sites you will get the following error when hitting the K2 App from a list/library, or attempting to activate the site:
"Thread 1: The remote server returned an error: (401) Unauthorized."
- You currently use a URL Rewrite on the SharePoint Web Application tied to the sites that see this issue. This is configured within IIS Manager. When disabling this URL rewrite the error disappears.
- Using a fiddler trace with the URL rewrite disabled, there are a lot of calls to your SharePoint site that are still hitting the HTTP URL:
- You may also see these hits to the HTTP URL within the Verbose SharePoint ULS logs.
- You'll notice on the hidden K2 settings list for a working and non-working site that the proper URLs are supplied. Modify the below URL to your SharePoint site to get to the hidden SharePoint list that K2 creates on each site where the app is activated:
- Attempting to run any of the SmartObjects in the SharePoint 2013 > [Site Category] > Management will give the same behavior and error.
This is caused by the SharePoint 2013 service instance still having the HTTP URL as a value for the Site URL Service Key.
Updating the service key via K2 Management or the SmartObject service tester tool is not supported. The overall refresh of a SharePoint service instance should be done via the Activation/Registration wizard on the K2 App within SharePoint.
Please reach out to K2 Support in order to update the Service Instance XML in the K2 Database. To speed up the process it is recommended that you create a full backup of the K2 Database in case any unforeseen issues appear while updating this data in the K2 DB.