开发者

i have a problem with adding a connection string into the web.config file

I want to add a connection string and give it name..

The connection string belongs to aspnetdb.mdf which was created when i added my CreateUserWizard.

This is its connection string:

Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Dima\My Documents\Visual Studio 2010\WebSites\WebSite10\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True

Now when i add it to the config file:

    <connectionStrings>
        <add name="YourGuruDB" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Dima\My Documents\Visual Studio 2010\WebSites\WebSite10\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient开发者_如何学C"/>
  </connectionStrings>  

it shows me weird line underneath of part of the string which prevents it from being executed..

I also dont understand the connection between the membership config and the database

    <membership defaultProvider="MyMembershipProvider">  

What is this provider? Shouldnt it be .NET Framework provider? Same as the aspnetDB

Also why do i see red Xes on the databases i created/and the system created whenever i open my server explorer?


try taking out the double quotes within the connectionString="" attribute.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜