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?
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.Datain the namespace, and remove the connection string section from theweb.configfile. This should remove all database dependencies.