K2 for SharePoint - AppDeployment.exe error: "Unable to connect to the K2 environment with the given URL" when running AppDeployment.exe
kbt108034
PRODUCTIssue
When running the AppDeployment.exe on the SharePoint 2013 server and entering any K2 URL (e.g. https://k2.domain.com) and clicking on Test or Next, it fails with the following error message:
Unable to connect to the K2 Environment with the given URL
Symptoms
The following were reviewed:
- The signature hash for the SSL certificate used for the K2 site should be SHA256 (or higher) and not SHA1 or MD5 (verified).
- Open ports and firewall settings as per this article.
- Used Telnet client to connect to port 6332 from the SharePoint server to the K2 server.
- Tried to open the K2 AutoDiscover URL using a web browser and it failed.
It is possible to open the K2 AutoDiscover URL from the SharePoint 2013 server using any web browser.
Example URL: https://k2.domain.com/autodiscover
It should open or download a JSON file containing all the K2 URLs.
Resolution
After checking IIS on the K2 server, the Authentication mode "ASP.NET Impersonation" was set to "Enabled" for the AutoDiscover app (under the K2 site). Once this was disabled, the URL opened and it worked.