# ValidateLicenseOnServer

### Description

Performs the following validations on the License Server:

* Checks if the time on the client system is synchronized with the License Server.
* Calls IsLicenseKeyRevokedEx to check if the license was revoked.
* Calls IsIllegalComputer to check if the license is registered in the database.
* Publishes Analytics to the server if PublishAnalytics is set to true.
* Records the last time connection to the server was made in order to enforce the MaxDaysOffline setting.
* Verifies whether the system has exceeded the MaxDaysOffline setting.

```csharp
 bool ValidateLicenseOnServer (string webServiceUrl, 
                               string activationKey, 
                               string computerKey, 
                               string computerID, 
                               out EServerErrorCode errorCode, 
                               out string returnMsg)
```

### Parameters

| Parameter     |                                          Type                                         | Description                    |
| ------------- | :-----------------------------------------------------------------------------------: | ------------------------------ |
| webServiceUrl |                                         string                                        | URL to the QLM License Server  |
| activationKey |                                         string                                        | the license key to validate    |
| computerKey   |                                         string                                        | the computer bound key         |
| computerID    |                                         string                                        | the unique computer identifier |
| errorCode     | [EServerErrorCode](/docs/api-reference/.net-api/qlmlicense/enums/eservererrorcode.md) | returned error code            |
| returnMsg     |                                         string                                        | returned error message         |

### Return

| Type | Description                   |
| ---- | ----------------------------- |
| bool | true if the license is valid. |

### Remarks

If validation fails, errorCode and returnMsg provide additional details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/api-reference/.net-api/qlmlicense/application-methods/validatelicenseonserver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
