asp.net - How to configure SQL Server + Web.config -


i'm new asp.net , have been given access solution trying , running. in web.config, see this:

<add name="foobar_connection" connectionstring="initial catalog=foobar;data source=qxqdesktop101\sqlexpress;connect timeout=900;password=foo; user id=bar;" providername="system.data.sqlclient"/> <add name="sitemapconnectionstring" connectionstring="initial catalog=foobar;data source=qxqdesktop101\sqlexpress;connect timeout=900;password=foo; user id=bar;" providername="system.data.sqlclient"/> 

since didn't database along solution, trying create in sql express. named db foobar match see in connection string. data source copied properties of foobar db. don't know how create user , password db. i'm hoping once created , associated db i'll able closer running application.

i think need create user db. right? if so, how do this?

you can try this.

if haven't set login details login sql server can apply connection string

<add name="foobar_connection" connectionstring="initial catalog=foobar;data source=qxqdesktop101\sqlexpress;connect timeout=900;integrated security=true" providername="system.data.sqlclient"/> 

and if apply login credential sql server connection string this

<add name="foobar_connection" connectionstring="initial catalog=foobar;data source=qxqdesktop101\sqlexpress;connect timeout=900;password=foo; user id=bar;" providername="system.data.sqlclient"/> 

to login credential please open sql server management studio , in please take login name userid , password password else can connect first one.

have great day.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -