views:

19

answers:

2

Hi, I have set up a small SQL Server database for users to login and also create accounts. There is a problem with the connection string though. Whenever I use the connection string below in the web.config file I get a server error page and cannot view the website. However when I take out this connection string I am able to view the website albeit the database doesn't work. Any ideas would be greatly appreciated.

<configuration>
    <appSettings/>
    <connectionStrings>
        <addname="ConnectionString" connectionString="Server=.\SQLEXPRESS;Database=medicale_Members;User ID=user_admin;Password=medicalmembers;"/>
    <connectionStrings/>
    <system.web>
A: 

Change it to:

</connectionStrings>

Also as another person mentioned. Change the add to:

<add name ... />
Dismissile
Thank you that was the problem
pmoth81
+1  A: 

Unsure if it's a typo in your question, but you need to ensure your connection string element looks like:

 <add name

rather than

<addname

Ensure you close your element with

 </connectionStrings>
p.campbell