.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Change windows password remotely

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net

Hi all,

Not sure where to post this, so I thought I'd start here...

I am designing a website (ASP.NET in VB) and I'd like it to have the following features: to generate a random string to be used as a password. This bit I should be able to manage, the bit I don't have a clue on is how I can pass this to a Windows machine (on a workgroup not AD) to change a user's account password.

In summary, can anyone help me to remotely change a user's password on a Windows workgroup machine using ASP.NET with VB?

FYI, I have full administrator access.

Thanks in advance for any help you can provide.
Jim :-)

View Complete Post

More Related Resource Links

Change Password for Windows Authentication


Hello all,

I do not seem to be able to find even a yes no answer on this...

Using windows Authentication... is it possible to progrematically change a password?


I tried using several ways to do this. I tried using the ChangePassword  control. This tells me that minimun characters is 7 even though I have more then 7 characters... I also tried using this method:

            if (u.ChangePassword(TextBox2.Text, TextBox3.Text))
                LabelError.Text = "Password changed.";
                LabelError.Text = "Password change failed. Please re-enter your values and try again.";
        catch (Exception ex)
            LabelError.Text = "An exception occurred: " + Server.HtmlEncode(ex.Message) + "<BE>" + ex.ToString() + ". Please re-enter your values and try again.";


The user is always null... and I am assuming this is because this object is indended to use with Forms authentication.


All I want to do is have an option for users to change passwords. Is this possible with Windows Authentication?

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

Password change control won`t accept new password


Hi guys

I am developing a shopping cart with asp.net and sqlexpress. I am using aspnet authentication components to create a backend page. I designed the site to let in only authorized users in. 

Yesterday, I forget my password to login to backend and asked system recover my password. with recover password of the asp.net I was able to receive the temp password. I took that and logged in, of course asp.net forward me to password change component which I am having problem with. 

Every time I change my password , password change shows that I was successfull but after clicking on the continiue button password change component comes back. I went to properties of password change component and entered the main default page as destination but it is not helping. 

I close the IE clear the cache , even restart the machine. When I login always taking me to the password change page.

So, I need your help with this. Please let me know your inputs.


how do i create a windows form application login for to validate username and password from sql serv

 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

Change Password

Hello, I'm trying to change the password of a user. This is my code: Dim conn As New ServerConnection("STATION01\SQLEXPRESS", wContainer.Username, wContainer.Password) Dim myServer As New Server(conn) Dim myUsername As String = TextBox2.Text.Trim Dim myPassword As String = TextBox3.Text.Trim If myServer.Logins.Contains(myUsername) And myUsername <> String.Empty Then Dim db_login As New Login(myServer, myUsername) db_login.ChangePassword(myPassword) db_login.Alter() End If It doesn't work.

Change password for FBA users in claims setup not working as expected

Hi, I am trying to add a standard asp:changepassword control for external users. In the previous 2007 sharepoint environment this control was working "out of the box". I am pretty sure what is wrong as well,- but not sure how to fix it. A workaround that makes me able to change password is as follows: in the asp - control, I have added the option DisplayUserName="true" Then in the actual web-page, i can see that my username is: 0#.f|acaspnetsqlmembershipprovider|xxxxxx and not xxxxxx as i would excpect, as i use xxxxxx to log in. Editing the username to just xxxxxx makes the changing of password work, but this solution is not really nice to deploy to the normal end-users.. Any suggestion on how to make the username right? I've tried to set the username using the option UserName="<%=SPContext.Current.Web.CurrentUser.LoginName%>", but it does not seem to evaluate..  

Change from Forms Authentication to Windows Authentication

What do I need to do in order to change an application from Forms Authentication to windows authentication?

LDAP - directory entry issue with out user and password using impersonate and windows authentication

Hi All I am using the below code to fetch the user information from LDAP             DirectoryEntry entry = new DirectoryEntry("LDAP://DEV");             DirectorySearcher searcher =  new DirectorySearcher(entry);             SearchResult result;             searcher.Filter = "samaccountname=testuser";             result = searcher.FindOne(); here i am using windows authentication always and along with that when i enable the impersonate = true ,  the code fails at "result = searcher.FindOne();" with message "object reference not set to instance of an object "  also with the same code if i give the username and password along with the impersonate tag >> it works  or if i am using the user and password along with the DirectoryEntry  object then also it will work  but it fails with same user that i gave in impersonate tag / directory entry object with windows authentication enabled  and the  user logged to the application and no username and password tag in directory entry / impersonate tag  Interesting thing is that  in our development server ,  i am able to execute the same code with out user name p

change password from the database

I have created login page(login.aspx) using login cotrol, now my lead asked me to provide an option "Change Password" so that end-user can change his password any time.I have created different form named as ChangePassword if you click lable ChangePassword on login.aspx page a pop-up window appears with changepassword control.how can i make this work using same(login) table. i searched around for code around i did not find.I used this link to create login page http://www.vbdotnetheaven.com/UploadFile/raj1979/VBLoginControl07242008114552AM/VBLoginControl.aspx Can any one help me,thanks

how to change the web application Database connection form Windows authentication to SQL Server acco

Hi, I have a web application created and Database connection authentication was given as Windows authentication. how can i change it to a SQL server account in MOSS 2007. Thanks in advance.

Windows.Forms.Label size change issue



In a Windows Forms application developed with VB2008 Express, Label controls change size the first time the .Text property is updated.


On a Windows XP Pro SP3 system where the app was developed the labels retain the size set at design time.  On other systems, one also Windows XP, one Windows 7, labels shrink (all to the same size independent of content) the first time their .Text property is updated.  Labels that do not have their .Text property updated retain their design size.

Additional information:

The labels all occur within a FixedPanel of a SplitContainer.
Salient properties for the Label controls:
Anchor: Top, Left
AutoSize: False
BorderStyle: FixedSingle
Dock: None
Enabled: True
FlatStyle: Standard
Image: None
Locked: False
Margin: 0,0,0,0

Change Password for SP administrator in sharepoint 2010


Dear All,

What is the optimal steps to Change Password for SP administrator in sharepoint 2010 to aviod and problems .


error message customization in create user wizard, change password wizard


Hi All,

Create User Wiard and Change Password Wizard contain error message literals. They display error messages when a user is trying to sign up with an username that already exists and so on.

These error messages are pre-set. How can they be customized. In particular, how can they be adjusted depending on the language.

How is this usually best achieved?

Thanks a lot.


Central Administration not Available, STSADM password reset errors "job-admin-apppool-change" alread


Hi Everyone,

I think I've shot myself in the foot by not properly following set up instructions.

I have a two-fold problem.  Firstly, my Sharepoint Central Administration V4 site is showing Service Not Available.  This seems to be related to the credentials the Central Administration V4 Application Pool - hitting Test Settings within IIS Manager for the site shows an Authentication and Authorization error for the credentials due to a bad password.

My reading indicates that I should run something to the effect of:

%STSADM -o updatefarmcredentials -userlogin DOMAIN\username -password <new password as set via AD>

This runs into the following Error message

Error deploying administration application pool credentials. Another deployment may be active. An object of the type Microsoft.SharePoint.Administration.SPAdminAppPoolCredentialDeploymentJobDefinition named "job-admin-apppool-change" already exists under the parent Microsoft.SharePoint.Administration.SPTimerService named "SPTimerV4".  Rename your object or delete the existing object.


I've tr

Windows Authentication doesn't work after change of admin pass



J have read many answers about

Login failed for user ''. The user is not associated with a trusted SQL server connection

error, but I don't want to mess up in my sql server so I want to be sure that what I do is OK.

Environment description:

In my company, we have our own application wchich we use to connect to database. All users use SQL Server Auth except me. I can log using Windows Auth from server and from my second computer.

Now everything works fine.

- My comp is in our domain 'OurDomian'.

- On server in AD is admin account 'SqlAdmin'.

- In MSSMS in Security->Logins there is account: OurDomian\SqlAdmin

- on my comp account OurDomian\SqlAdmin is added

I can log to sql server from  my comp using 'Integrated Security' in application with no problem.

Problem description:

Problem starts when I change SqlAdmin password on server.

When I connect from my comp I get the above error. But when I connect from server there is no problem.

I searcher application code and I don't think that I have to change somthing in it. Probably I have to change something with account and permissions.

1. Will it bee enough to delete and add again 'OurDomian\SqlAdmi

How to change icon off vshost.exe in taskbar of windows?


Hi All.

How I can change the Icon of running UI app which located  on taskbar's windows?

Thank you.


How to connect to a WCF intalled as a windows service with user name and password


I have installed my WCF service using

        <endpoint address="service" binding="wsDualHttpBinding" contract="aa.IABC" name="HttpBinding"/>

And I intall this service as a Windows service..

When installing the service I am giving

                serviceProcessInstaller1.Account = ServiceAccount.User;
                serviceProcessInstaller1.Username = userName;
                serviceProcessInstaller1.Password = password;   

I am trying to connect to this service using my client but cannot open the channel .


          <binding name="HttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
              receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend