locked
Want to add Helpdesk functions to a webpage RRS feed

  • Question

  • User1989971201 posted

    I want to have a page on my internal website written in asp.net/vb that the helpdesk can go to and do the following functions:

    unlock user accounts, reset passwords, change passwords.

     

    possible adding the ability to add and remove user accounts from groups in AD.

    how hard is this to code?  im not that great at coding - still learning.

    Tuesday, April 30, 2013 3:29 PM

Answers

  • User-1037239328 posted

    Just happens that I posted code that, with minor modifications, will do what you want. The AccountManagement namespace that I am using has functions to Reset and to Change Passwords.

    For example, for the user to change her password-- on the UserPrincipal object, you would call:

       up.ChangePassword(OldPassword, NewPassword);

    See the code here:
    http://forums.asp.net/t/1902862.aspx/1?The+In+Famous+Access+Denied+problem

    Just 'cuz mine ain't workin' don't mean it won't work for you. I think there's something screwy in our Active Directory.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 30, 2013 4:40 PM

All replies

  • User-1037239328 posted

    Just happens that I posted code that, with minor modifications, will do what you want. The AccountManagement namespace that I am using has functions to Reset and to Change Passwords.

    For example, for the user to change her password-- on the UserPrincipal object, you would call:

       up.ChangePassword(OldPassword, NewPassword);

    See the code here:
    http://forums.asp.net/t/1902862.aspx/1?The+In+Famous+Access+Denied+problem

    Just 'cuz mine ain't workin' don't mean it won't work for you. I think there's something screwy in our Active Directory.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 30, 2013 4:40 PM
  • User1989971201 posted

    is this in C# ?  i have my page written in vb. 

    Tuesday, April 30, 2013 4:44 PM
  • User-1037239328 posted

    Yes. It's C#.

    There are two web sites that I find invaluable. Copy and paste C# code in, and get VB code out. Or vice-versa.

    http://www.developerfusion.com/tools/convert/csharp-to-vb/

    http://converter.telerik.com/

    So just copy and paste the code I directed you to, click the Coinvert button, and you're set.

    By the way, since you professed up front to be relatively new, I strongly recommend to all .NET developers that they get comfortable in BOTH C# and VB. Don't let anybody tell you that one is better than the other. I personally prefer VB, but right now I'm working in C#. Just takes me a few days to switch gears when I change projects. And every so often I still enter "Dim ...." in a C# block, or put a semicolon at the end of a VB line. Anyway, don't limit yourself to one language, or (in my opinion) you're limiting your earnings potential.

    Tuesday, April 30, 2013 5:33 PM
  • User1989971201 posted

    Awesome.  here is a dumb question.  how on the page can i get the helpdesk guy to browse for the user that he or she needs to modify prior to making the account change.  im basically buiding this from scratch.

    Tuesday, April 30, 2013 5:38 PM
  • User-1037239328 posted

    Use a PrincipalSearcher or a DirectoryEntry Searcher to "FindAll" users in the directory. You would have to connect the searcher to the place(s) where users are registered.

    Then it depends on how many users you have. If there are less than 50 or so, then you could use a DropDownList to select an individual. Or more likely, you will want to use a DataGrid with paging enabled. I get all the "first letters" of a list, then build a horizontal line of links from those letters, Click one, and I re-bind the DataGrid with users starting with that letter. Shortens the display a bunch.

    Get used to this documentation:
    http://msdn.microsoft.com/en-us/library/bb299745(v=vs.100).aspx 

    Tuesday, April 30, 2013 5:49 PM
  • User1989971201 posted

    is there anyway possible you can email me an example of the second part of that?  i would love to know how to do that for other parts of this project as well.  the datagrid with paging and tying it to a search and building horizontal line of links from the letters then re-bind.,  that sounds awesome and i want to learn that. 

    Tuesday, April 30, 2013 5:52 PM
  • User-1037239328 posted

    I'll send you more extensive code tomorrow morning, if you will send an e-mail address. Send it to dehaggard (at) gmail (dot) com.

    Tuesday, April 30, 2013 6:20 PM