1

I'm using database in server in my asp.net mvc web application. Now, i want to use the database in my local db temporarily. What changes do i have to do?

3
  • Change your connection string? Commented Apr 5, 2017 at 10:49
  • you should post a snippet of your code Commented Apr 5, 2017 at 10:52
  • Change your connection string in the web.config Commented Apr 5, 2017 at 11:00

2 Answers 2

3

Change your connection string in the web.config file

for your reference posting sample local connection string below

  <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-ProfileSearch-20170215151903;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-ProfileSearch-20170215151903.mdf" providerName="System.Data.SqlClient"/>
Sign up to request clarification or add additional context in comments.

1 Comment

Welcome Coderstech. Happy coding!
0

Change you connection string and replace DataSource = [db Name] to DataSource = LocalDB.

That's all.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.