Beispiel #1
0
 public Int64 StartApplicationSession(Guid applicationKey, Guid toolId, string toolVersion, string computerName)
 {
     try
     {
         if (Credentials != null && !string.IsNullOrEmpty(Credentials.Username) && !string.IsNullOrEmpty(Credentials.Password))
         {
             Guid userId = AuthenticateClient("StartApplicationSession");
             return(WebServiceDAL.ReCreateApplicationsSession(applicationKey, toolId, toolVersion, userId, computerName, DateTime.UtcNow, DateTime.UtcNow, null));
         }
         else
         {
             AuthHeaderValidation.CreateSoapHeaderLog("StartApplicationSession", toolId, applicationKey, null, null, 10, null);
             return(WebServiceDAL.CreateApplicationsSession(applicationKey, toolId, toolVersion, computerName, DateTime.UtcNow, DateTime.UtcNow, null));
         }
     }
     catch (Exception ex)
     {
         // Log it
         WebServiceDAL.StoreException("Webservice", "StartApplicationSession", ex);
         return(0);
     }
 }