| Severity | Warning or Error |
| Reported by | PostSharp |
| Message | <Reason> The MSBuild property PostSharpAllowInsecureLicenseServer also controls this message: 'Warning' (the default) reports a warning, 'Error' breaks the build, and 'Allow' accepts the insecure URL. |
Cause
The PostSharpLicense MSBuild property or environment variable, a License element of a postsharp.config file, or a registration on the machine can give the URL of a PostSharp License Server instead of a license key. To request a lease, PostSharp sends the name of the current user and the name of the machine to this server. When the URL starts with http://, this information travels in cleartext.
PostSharp reports PS0305 for each license server that it reaches over HTTP. <Reason> names the server and explains the risk. PostSharp still uses the server.
The PostSharpAllowInsecureLicenseServer MSBuild property decides what PostSharp does:
| Value | Effect |
|---|---|
Warning, or no value |
PS0305 is a warning. This is the default. |
Error or False |
PS0305 is an error, and the build stops. |
Allow or True |
PostSharp does not report PS0305. |
PostSharp does not contact license servers in an unattended build, such as a build on a continuous integration server, so it does not report PS0305 there.
This message depends on a license server registered for the project or the machine, so no example can show it.
Resolution
Use the
https://URL of the license server, in the property, the file or the registration that names it. See Deploying License Keys. When the server does not accept HTTPS yet, ask its administrator to enable it; see Installing and Servicing PostSharp License Server.When the license server runs in a network that you trust and must remain on HTTP, accept the insecure URL in the project file:
<PropertyGroup> <PostSharpAllowInsecureLicenseServer>Allow</PostSharpAllowInsecureLicenseServer> </PropertyGroup>To forbid insecure license servers in your builds, set
PostSharpAllowInsecureLicenseServertoError.
See Also
Other Resources
Installing and Servicing PostSharp License Server
Deploying License Keys
Well-Known MSBuild Properties
License Troubleshooting