开发者

including a connection string generates error in asp.net site

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&g开发者_Python百科t;


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>


Change it to:

</connectionStrings>

Also as another person mentioned. Change the add to:

<add name ... />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜