Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote Desktop not working with Windows Azure Cloud Service. "Legacy plugin RemoteAccess is found in role"

I'm trying to publish an Azure Cloud Service but I keep getting this error - 'Legacy plugin RemoteAccess is found in role . Please remove the import from Service Definition file to use the Extension.'

I have the following lines in my csdef -

 <Import moduleName="RemoteAccess" />
 <Import moduleName="RemoteForwarder" />

and the following lines in my cscfg -

<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="username" />
 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="password" />
 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2016-06-03T23:59:59.0000000-07:00" />
 <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />

and

 <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="thumbprint" thumbprintAlgorithm="sha1" />

From what I've read that should be sufficient. I also haven't found anything about a 'Remote Access' plugin being deprecated.

I also tried deleting these lines and publishing - that works fine but I'm unable to use Remote Desktop. I get the error "The specified user name does not exist. Verify the username and try logging in again. If the problem continues, contact your system administrator or technical support." when trying to log in.

like image 690
Nick Avatar asked Oct 21 '22 08:10

Nick


1 Answers

In case someone stumbles upon this page from a search engine, we had the same problem when doing a package deployment of a Cloud Service. We were using Visual Studio 2019 and Azure SDK 2.9.

After reading this page, we removed all these lines from our ServiceDefinition.csdef file:

<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />

and these lines from all our ServiceConfiguration.cscfg files, in the <ConfigurationSettings> section:

<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="..." />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="..." />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="..." />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />

and in the Certificates section:

<Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="..." thumbprintAlgorithm="sha1" />

Then we enabled the RDP access via the Azure portal. Once enabled, the access stays valid even after deployment updates.

like image 184
Andreas Schwarz Avatar answered Oct 27 '22 21:10

Andreas Schwarz