I am trying to get my asp.NET application to register new users in Active Directory. using the default Active Directory Membership Provider in asp (.NET 4.5)
While logging in works just fine, I get the following error when trying to create a new user: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
https://i.stack.imgur.com/hOQfq.png (I know this should be an image, but I can't embed those yet)
This happens as soon as I submit the form. Though it also happens with the Create User Wizard.
I have already tried the possible solutions from the following answer to a similar question: https://stackoverflow.com/a/25841025/4385713
I also tried completely disabling the firewall (I know, bad practice, just had to make sure it wasn't that) but it still wouldn't work.
The asp application is running on my local PC, the Active Directory is installed on a VM in Windows Azure.
Any help would be appreciated!
Thanks,
Cas
PS: I use the following connection string and membership provider:
<add
name="ADMembership"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
applicationName="/"
connectionStringName="ADConnectionString"
attributeMapUsername="sAMAccountName"
connectionUsername="USERNAME"
connectionPassword="PASSWORD"/>
<add name="ADConnectionString" connectionString="LDAP://23.97.173.160:389/CN=Users,DC=ictforevents1,DC=cloudapp,DC=net" />
I resolved the issue by removing the port from the connection string.
I don't know exactly why this solved it because Microsoft Support assured me that 389 is the port I need.