Matt Hanson
Matt Hanson

Reputation: 3504

How to Test ASP Application on Domain when Development Environment isn't on Domain?

I'm just about to begin work on a new project and am just attempting to plan a few things out first. The project will be in ASP.NET, and will be using Active Directory for authentication and authorization.

My development environment consists on a development PC, not on any domain, and using Visual Studio 2012. I'll be wanting to do testing using a "dev" domain, running on a virtual machine.

What is the easiest/best/recommended way of doing my testing and debugging? Ideally I'd like to do by debugging directly on my development PC, while utilizing the resources on the virtual development domain.

Upvotes: 0

Views: 65

Answers (1)

Wiktor Zychla
Wiktor Zychla

Reputation: 48230

We did few large deployments of AD with asp.net applications with automatic account provisioning and 50k+ users and the idea was always to abstract the user backstore and have at least two or three implementations:

  • inmemory repository injected into upper layer services for unit testing them
  • database implementation convenient for developers as it is persistent, doesn't vanish on restarts
  • actual ad implementation tested separately in two different testing environments but not directly by developers (devs use the database repository)

Having the logic which relies on abstraction and is conveniently tested with the inmemory repository and then having the ad repository tested separately allows us to just compose these two on the production site.

Upvotes: 1

Related Questions