Solved

Adding Connectionstring in web.config file

Posted on 2010-11-08
3
373 Views
Last Modified: 2012-05-10
Hello, I want to add a certain line in the web.config file which would be the connectionstring.  I want to add the following line:

<add key="ConnectionString" value="server=test,4155;database=testdb;uid=admin;pwd=Password"/>

Where exactly would I add this <add key> line in my web.config file?
0
Comment
Question by:VBBRett
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34084921
<configuration>
  <appSettings>
   ... here
  </appSettings>

</configuration>
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34085147
Generally for connection strings you would add them to the <connectionStrings /> section rather than <appSettings />
0
 
LVL 4

Accepted Solution

by:
vinodch earned 500 total points
ID: 34085171
you have to add the key in appsettings, however you can use the connectionstring key

      <appSettings>
     <add key="ConnectionString" value="server=test,4155;database=testdb;uid=admin;pwd=Password"/>
 </appSettings>
 <connectionStrings>
            <add name="ConnectionString" connectionString="server=test,4155;database=testdb;uid=admin;pwd=Password"/>
      </connectionStrings>
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question