I am looking to develop an ASP.Net application that will allow a user to reset Windows domain passwords for anyone they are the manager of. For example: Finance manager can reset the password of anyone he is listed as a manager of in Active Directory.
I was wondering what the best way to do this was in terms of accessing Active Directory. Should I have a service account created which I call using my code, should I give all users access to reset AD passwords (they are unable to install software - like RSAT - on their terminals so this seems pretty safe), or should I use a third method I am not aware of?
If anyone could please tell me the best solution for this that would be great.
Yes, I want to have my txtGroup submitted along with btnQuestSave click. And this textbox is located in the same updatepanel with the button. Regarding another button, Button1, I didn't need it to produce submit, only dlgbox popup.
In this case there is no use in having two URI's pointing to the same resource.
When people can, they will keep links around to the URI including the aspx bit. Which means that all those links go broken should I change the default to index or whatever.
Having the default.aspx bit reveals details about the implementation that are totally irrelevant to visitors.
And those details do not serve any purpose other than increasing the burden of changing the technology stack implementing a site and that means increasing the lock-in with that technology (in other words: increasing the inertia with regard to changing it).
Pretty url's do not exist for the sole reason of being pretty...
How can i Add Dynamic Field in Database or XML File , when we add any Control into the Page in MVC 4.0. and when we add or Delete the new Field then no any effect made on Previous Entered Record.
Please Help me ,Very Important
The navigation capabilities in Bootstrap are comprehensive but the defaults don't suit the colour scheme of the website I am developing. They appear very difficult to tailor, particularly the colours of things like
on hover, on focus
etc. There are a lot of changes to be made to make sure it works under all circumstances. The other complication is that I have two nav bars, both of which will have their own colour scheme. I know I could re-code my own navigation in HTML and CSS, but that seems to be against the benefits of using Bootstrap. I don't want to have to also encode the collapsing the nav bar on phones.
Are there ways to control the colours that I haven't discovered?
You edit the CSS in the bootstrap until you like the appearance.
Themes in boot straps just have different CSS files assigned to the page to create a different color set
In the data access layer, stored proc is called, it fills the WorkQueueBE object and returns the result.
I need to write unit tests for this legacy code. I reckon i need to do some refactoring to introduce unit testing here.
Can someone please suggest how to move ahead, so that i can make the code loosely coupled.
Your code isn't really unit-testable as it stands. If you look at Microsoft Fakes you might be able to use that to mock your business layer as that can even mock static objects. If you want to do it "properly" then you'll need your BusinessLayer object to implement an interface (IBusinessLayer) and use inversion of control to pass an instance of your BusinessLayer or WorkQueueBEManager to your calling class. Rather than calling BusinessLayer.WorkQueueBEManager.GetItemByID(wqID) as you are now, you'll call the instance
BusinessEntity.WorkQueueBE be = this.businessLayer.WorkQueueBEManager.GetItemByID(wqID);
(where this.businessLayer is IBusinessLayer and populated via IoC) In your unit tests you then pass in a mocked version of BusinessLayer. If you google unit testing asp.net code you should find some specific examples of this stuff.
the code directly calls the dataaccess layer. This makes it untestable. What i want to acheieve is to start testing these methods, and create mock for data access layer so that it can return hardcoded values while testing.
But how do i proceed with that ? Create interface, implement them in data access layer ? If anyone can cite an example on how to implement it.
Assuming DataAccess is a static class, you are in for a bit of work. I can think of several approaches, all of them boiling down to some form of dependency injection without going as far as trying to shoehorn an IoC container into your existing code.
One approach that could work:
1. Create an IDataAccess interface. Give it all the methods your DataAccess class currently has to provide your business entities with their data.
2. Remove the static specifier from your DataAccess class and make it an implementer of the new IDataAccess interface.
3. Create a new static class, for example DataAccessLayer and give it a single method, for example: Current(). Implement that method to return an instance of the DataAccess class as an IDataAccess interface reference. It is up to you to create a new instance for every call or to create a single instance and return that all the time.
4. Give every business entity a property of type IDataAccess. (They do all derive from some base class I hope?) Name it DataAccess. As it is closer in scope than anything outside of your business entities any method in those entities referencing DataAccess should now use the interface property instead of the DataAccess class.
5. Implement the DataAccess property getter of your business entities in such a way that it can returns the DataAccessLayer.Current IDataAccess interface reference, UNLESS a private IDataAccess _DataAccess member is non-null. In that case return the member reference.
6. Give all your business entities an extra "InitalizeDataAccess" method taking an IDataAccess parameter. Implement it to assign whatever is passed in to the private _DataAccess member.
7. Use the InitializeDataAccess method in your tests to provide your business entities with an IDataAccess implementer (DataAccess fake) that provides the business entities with data as needed by your tests.
if i keep all code as it is and just change framework to 3.5 from 2.0 then this current code is working...so there is no issue with url ...i guess there is some issue in web.config setting for http handler..if you know this then please check...just to remind you that my webmethod is on my .aspx(code behind page itself)
Please check Default.aspx code behind code for reference
public partial class _Default : System.Web.UI.Page