Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > web.config

Reply
Thread Tools

web.config

 
 
Mark Goldin
Guest
Posts: n/a
 
      01-21-2004
What do I need to change in order to connect my databse:
server name is devsrv01, database is treeview

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!-- Modify connection string file to point
to your SQL Server database -->
<add key="ConnectionString"
value="server=localhost;UID=sa;PWD=admin;DATABASE= Test" />
</appSettings>
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<trace enabled="false"
requestLimit="10"
pageOutput="false"
traceMode="SortByTime"
localOnly="true"
/>

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="20"
/>

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>

</system.web>

</configuration>

Thanks


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      01-21-2004
That all depends on how your application is configured to work, but from the looks of it I'd say you need to change

<add key="ConnectionString" value="server=localhost;UID=sa;PWD=admin;DATABASE= Test" /

to something like

<add key="ConnectionString" value="server=devsrv01;UID=sa;PWD=admin;DATABASE=t reeview" /

HTH
Jeremy
 
Reply With Quote
 
 
 
 
Mark Goldin
Guest
Posts: n/a
 
      01-21-2004
I tried that.
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server
connection

This net (yes) stuff is killing me.

"Jeremy" <> wrote in message
news:7D71FDAD-9D95-4ED9-8667-...
> That all depends on how your application is configured to work, but from

the looks of it I'd say you need to change:
>
> <add key="ConnectionString"

value="server=localhost;UID=sa;PWD=admin;DATABASE= Test" />
>
> to something like:
>
> <add key="ConnectionString"

value="server=devsrv01;UID=sa;PWD=admin;DATABASE=t reeview" />
>
> HTH,
> Jeremy



 
Reply With Quote
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      01-21-2004
Well the UID needs to be a database account that has access to the treeview database, and the PWD needs to be the password for that account. It is highly recommended to NEVER NEVER NEVER use the sa (system admin) account when connecting to a database

HTH
Jeremy
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments