0

I have created an instance of ASP.NET Web Forms in my Microsoft Visual Studio. By default the program generates user login page and registration which are linked to the .mdb file.

I want to reconfigure the standard connection and link it to my instance of MSSQL 2012 SQLExpress server.

How can I do it?

1 Answer 1

1

Ok so I will give some direction and link you to a page. First let me ask you this the connection you are using presently is it in a web.config file. If so this is where you will change the server/instance and database/catalog name.

Web.Config modification for SQL Server Instance

or this link

Web Config modification for SQL Express 2

So if you in the web.config file you should see something similar to this.

<ConnectionStrings>
<add name="" connectionString="Server=(localhost)\SqlExpress;Max Pool    Size=300;Initial Catalog=database;User ID=username;Password=password;" providerName="System.Data.SqlClient"/>
 </Connectionstrings>

or

<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=  (LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\database.mdf;Initial    Catalog=database;Integrated Security=True" providerName="System.Data.SqlClient" />

you need to change the follow: Server or Data Source and Initial Catalog or AttachDbFilename

Now your credentials you may use any username and password that has access to the sql server express instance.

I hope this helps.

Sign up to request clarification or add additional context in comments.

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.