views:

34

answers:

1

I'm building a very simple ASP.NET MVC site that doesn't require a database and doesn't have user accounts or any other special ASP.NET stuff. When I first created the site with the ASP.NET MVC 1.0 site template in Visual Studio, the web.config page was configured to automatically connect to SQL Server Express as a User Instance.

Can I completely remove this dependency? If so, how do I get rid of all this database stuff?

+1  A: 

If you don't use any DB access at all, you can indeed remove this. MVC as such does not depend on databases, though most applications do use one (hence automatically configured connection string).

Simply remove any referenced assemblies that have System.Data in the namespace, and remove the connection string section from the web.config file. This should remove all database dependencies.

Oded
So, for providers, can I just delete each whole provider that uses the database? Afterwards, I'll remove the connectionstring section.
Maxim Zaslavsky
That should work fine.
Oded