0

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>
1
  • What does the error page say, and the connection string wasn't posted. Commented Aug 5, 2010 at 18:44

2 Answers 2

1

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>
Sign up to request clarification or add additional context in comments.

Comments

0

Change it to:

</connectionStrings>

Also as another person mentioned. Change the add to:

<add name ... />

1 Comment

Thank you that was the problem

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.