please suggest me how to host asp.net website using sql data base. i published sql.mdf file. is it (sql.mdf) possible to place in app_data folder?
- Your question is very unclear. If you want to use your database from withing the ASP.NET application, put the MDF file in App_Data and modify the connection string in web.config to point to that file. Otherwise, please elaborate.Slavo– Slavo2010-02-09 09:34:46 +00:00Commented Feb 9, 2010 at 9:34
Add a comment |
1 Answer
You need SQL Server to host the database.
Just putting the .mdf file in the app_data folder will not allow you to access the data in it.
In your website you will need to use ado.net, Linq to SQL or another data access layer to connect to the SQL server.
You should be able to use SQL Server Express, if cost is an issue.