Domyślne połączenie i członkostwo - jakie jest połączenie między serwerem localsqlservice a połączeniem domyślnym
Hmmmm ... Naprawdę nie mogę się tym zająć.
W web.config mam:
<connectionStrings>
<clear /> <!--- need this to prevent using LocalSqlServer from machine.config or somewhere becouse it is not present when when publish to hosting -->
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-Goaly-20120615111028;Integrated Security=SSPI" />
</connectionStrings>
i
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<!-- I think this line is telling asp.net that I want the membership working agains defaultconnection, and not LocalSqlServer connection????? -->
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
Ale wtedy narzeka:
The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
Kiedy używam publikowania z VS2012 RC na karcie ustawień, otrzymuję ModelContext i DefaultConnection, więc jak to ma działać?
Chcę tylko uzyskać tabele członkostwa w tej samej bazie danych, co tabele utworzone przez modelcontext.
Tak powinno być, ale musiałem to trochę skomplikować.
Dzięki za pomoc.
pozdrowienia
Larsi