views:

260

answers:

2

I have a ASP.NET MVC site using Membership Provider. I have trouble testing some functionalities including register a new user.

The ASP.NET website doesn't have a way to delete/remove a registered user, so in my testing project (WatiN with NUnit), I am trying to delete a testing user account by calling Membership.DeleteUser(). Then I realize I cannot use this since I cannot configure the membership provider with web.config in my NUnit project (in visual studio).

How do I configure the membership provider without using ASP.NET?

A: 

Have you looked into the Client Application Services? I'm not sure if that is what you want, but it is worth looking into.

Joe
+1  A: 

You configure it in your app.config for your NUnit project. Check out this blog post. It provides an example (or close) to what you wan tot do. Here's another example of how to use app.config to configure the Membership Provider.

JP Alioto