Beispiel #1
0
        public bool CreateApplicationWebClientExceptionLog(Guid applicationKey, Guid toolId, string type, string url, string description, string message, string stack, string innerExceptionMessage)
        {
            try
            {
                try
                {
                    if (!string.IsNullOrEmpty(stack))
                    {
                        stack = Encryption.DecryptString(stack);
                    }
                }
                catch { }

                if (Credentials != null && !string.IsNullOrEmpty(Credentials.Username) && !string.IsNullOrEmpty(Credentials.Password))
                {
                    try
                    {
                        Guid userId = AuthenticateClient("CreateWebClientExceptionLog");
                        return(WebServiceDAL.InsertApplicationsWebClientExceptionLog(applicationKey, toolId, userId, type, url, description, message, stack, innerExceptionMessage));
                    }
                    catch (Exception ex)
                    {
                        AuthHeaderValidation.CreateSoapHeaderLog("CreateWebClientExceptionLog", toolId, applicationKey, null, null, 10, null);
                        return(WebServiceDAL.InsertApplicationsWebClientExceptionLog(applicationKey, toolId, null, type, url, description, message, stack, innerExceptionMessage));
                    }
                }
                else
                {
                    AuthHeaderValidation.CreateSoapHeaderLog("CreateWebClientExceptionLog", toolId, applicationKey, null, null, 10, null);
                    return(WebServiceDAL.InsertApplicationsWebClientExceptionLog(applicationKey, toolId, null, type, url, description, message, stack, innerExceptionMessage));
                }
            }
            catch (Exception ex)
            {
                // Log it
                WebServiceDAL.StoreException("Webservice", "CreateApplicationWebClientExceptionLog", ex);
                return(false);
            }
        }