Unable to RDP to Windows Azure Svc VM (RDP enabled, RDP endpoint configured)

断了今生、忘了曾经 提交于 2019-12-10 19:13:41

问题


I've seen multiple articles discussing how to configure your RDP settings via visual studio, credential caching via the RDP program, and yet we still have a problem.

I've also seen articles saying "you need to add an endpoint to your role for RDP" -- If I do that, Visual Studio complains that "an endpoint is already defined for remote desktop" -- because it does this behind the scenes (or so it seems) when you enable RDP via the UI. (It wont let me publish, so I'm going to (cringe) assume this is already done for me.)

I should also note, we have other Azure Services and we are able to RDP to them just fine. Our local connection/firewall (as much as I wish I could blame it) is not to blame.

Here's what is going on: If I delete all instances of my cloud service and deploy via visual studio (yes, I've enabled remote desktop, set a password, set my cert to auto as well as tried various certs in the drop down), I connect via RDP by using the "Connect" button directly from the Windows Azure portal. I am prompted for a username (which is prepopulated) and a password.

I am unable to log in because my credentials are invalid. I've tried redeploying and typing a new password... same result. I've tried changing the password via Azure Portal... same result.

Part 2: If I have an instance previously deployed and I change the password via visual studio and deploy again, I am unable to RDP to the machine at all. I do not get the login/pw prompt, and get the "unable to connect to remote machine..., remote desktop is not enabled, the machine is turned off, etc." error message.

So essentially, I have two problems. Why am I unable to RDP after a second deploy on top of a previous, and why are my credentials always invalid regardless? This is driving me nuts, I've even gone as far as doing compares between my other projects config files to see if something was missing -- no dice. It all looks the same minus names and dates.

Can anyone relate? (First question ever posted, I've been lurking for years. Hi.)


回答1:


The reason for invalid credential is, The password should met 'Password Complexity'.

Passwords cannot contain the user’s account name or parts of the user’s full name that exceed two consecutive characters. Passwords must be at least six characters in length. Passwords must contain characters from three of the following four categories: English uppercase characters (A through Z). English lowercase characters (a through z). Base 10 digits (0 through 9). Non-alphabetic characters (for example, !, $, #, %).

Note: You can set simple password.Azure doesnt throw any error, but it wont allow you to login with simple password. It will just tell "Invalid Credentials". I have suffered because of this problem.




回答2:


While this doesn't really address the problem, here's what I did to fix it.

I created an entirely new Azure Cloud Service project, assigned it to use my existing web project, published it and let Azure do all of its magic to create a new service instance (again) and what do you know, works without a problem.

I'm not sure if there may be a bug in Visual Studio or what, but this was certainly strange. Also, as a friendly reminder, remember to clean up your 'dead' services so you don't get billed!




回答3:


My problem was that my username was 21 characters long.

http://blogs.msdn.com/b/narahari/archive/2011/08/29/getting-quot-your-credentials-did-not-work-quot-when-connecting-to-windows-azure-vm-s.aspx

Since, validation is not performed by Windows Azure Tools for username field, one needs to be cautious about what value that is being configured. What really happens behind the scenes is, Windows Azure creates a specified user on the VM and grants permissions required for Remote Desktop access. So, generic username requirements/guidelines are applicable here as well.

Some of standard requirements

Username should not match with existing user accounts. Few user accounts that are already presented on the Windows Azure VM’s are “Administrator”, “Guest”. Hence, do not use these names while configuring remote desktop access.

  • Names may not consist entirely of periods and/or spaces, or contain these characters: \ / " [ ] : | < > + = ; , ? * @
  • Length of username should be <=20
  • Username should not be null
  • Password cannot contain the username or part of username


来源:https://stackoverflow.com/questions/17887432/unable-to-rdp-to-windows-azure-svc-vm-rdp-enabled-rdp-endpoint-configured

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!