Troubleshooting AppManager - akumina/AkuminaTraining GitHub Wiki
Troubleshooting AppManager begins with localizing the issue encountered to either a setup issue, or a runtime issue.
Setup Issues
AppManager setup issues are problems that arise before AppManager is fully installed, or prior to beign able to use AppManager connected to SharePoint. An example would be if the setup procedure had been followed, yet there was an error when first connecting to AppManager. An error would be displayed, and would fall into 2 categories, HandShaking or Permissions.
Permissions
AppManager stores its log information into the /logs/ directory by default, and when there is a problem will attempt write there. If The log is unable to write, then a permissions error will be thrown, similar to “Unable to acess the path [path to interchange log file]”. If this occurs, you must loosen the permissions on the /logs/ directory, to allow the site user (usually the app pool user, but it varies) to write to that directory. You should also check the permissions on dss.config as well, as that is the configuration file that the system writes to.
Handshaking
AppManager handshaking issues will be written into the log, and will result in error messages on the explorer interface. These can be tracked down in the log file:
WHEN PASSWORD IS WRONG (On premise certificate)
2016-02-11T02:15:11.4687394Z 0dc74b6c-eebf-53c0-1b33-63957412c647 101 1 [ERROR] Info Error 0 [errorMessage : System.TypeInitializationException: The type initializer for 'Akumina.Infrastructure.SharePoint.TokenHelper' threw an exception. ---> System.Security.Cryptography.CryptographicException: The specified network password is not correct.
at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)
at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password)
at Akumina.Infrastructure.SharePoint.TokenHelper..cctor()
--- End of inner exception stack trace ---
at Akumina.Infrastructure.SharePoint.TokenHelper.GetS2SClientContextWithWindowsIdentity(Uri targetApplicationUri, WindowsIdentity identity)
at Akumina.Interchange.Services.BaseService.a()
at Akumina.Interchange.Services.BaseService.CreateClientContext()
at Akumina.Interchange.Services.BaseService.GetContext()
at Akumina.Interchange.Services.ContentTypeService.GetAllWebs()]
Corresponding ERROR: The specified network password is not correct
WHEN .CER USED INSTEAD OF .PFX (On premise certificate)
2016-02-11T02:16:25.0927184Z 0dc74b6c-eebf-53c0-1b33-63957412c647 101 1 [ERROR] Info Error 0 [errorMessage : System.TypeInitializationException: The type initializer for 'Akumina.Infrastructure.SharePoint.TokenHelper' threw an exception. ---> System.ArgumentException: ID2057: Cannot construct a X509SigningCredentials instance for a certificate without the private key.
Parameter name: token
at Microsoft.IdentityModel.SecurityTokenService.X509SigningCredentials..ctor(X509SecurityToken token, SecurityKeyIdentifier ski, String signatureAlgorithm, String digestAlgorithm)
at Microsoft.IdentityModel.SecurityTokenService.X509SigningCredentials..ctor(X509Certificate2 certificate, String signatureAlgorithm, String digestAlgorithm)
at Akumina.Infrastructure.SharePoint.TokenHelper..cctor()
--- End of inner exception stack trace ---
at Akumina.Infrastructure.SharePoint.TokenHelper.GetS2SClientContextWithWindowsIdentity(Uri targetApplicationUri, WindowsIdentity identity)
at Akumina.Interchange.Services.BaseService.a()
at Akumina.Interchange.Services.BaseService.CreateClientContext()
at Akumina.Interchange.Services.BaseService.GetContext()
at Akumina.Interchange.Services.ContentTypeService.a()]
Corresponding ERROR: Cannot construct a X509SigningCredentials instance for a certificate without the private key
WHEN ISSUERID IS WRONG (On premise)
2016-02-11T02:17:37.5809047Z 0dc74b6c-eebf-53c0-1b33-63957412c647 101 1 [ERROR] Info Error 0 [errorMessage : System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Akumina.Interchange.Services.BaseService.CreateClientContext()
at Akumina.Interchange.Services.BaseService.GetContext()
at Akumina.Interchange.Services.UserService.GetCurrent()
at Akumina.Interchange.Web.Controllers.BaseController.PoplateUser()]
Corresponding ERROR: The remote server returned an error: (401) Unauthorized.
Runtime Issues
All other runtime issues encountered will be written to the log, located in [InterchangePath]/logs/.