|
|
| SqlMembershipProvider, use from WindowsForms with not trusted connectionstring? |
|
| Author |
Message |
miklos.smeja

|
Posted: .NET Framework Data Access and Storage, SqlMembershipProvider, use from WindowsForms with not trusted connectionstring? |
Top |
Hello, i use the Login controls supported by ASP.Net 2.0. But i have some problems... :) I have an application with two GUI-s: - winforms (the core, maintenance, etc.) - asp.net 2.0 (basic public functions) So, i had to solve the problem: create/manage users form winforms - it's not a big deal: [problemsolver article].
But! What is when i have users with a not trusted connection ! So, the connection stirng might be look like this: string conStrFromConfig = @"server=srv1\sql2005;Database=MyDB;trusted_connection=no;"; When the application starts, ask for the user name and password. When clicks Login: conStrFromConfig += "user id=user1;password=xxx;" Then everything is ok, connection can be estabilished with the db server. I can't do this with SqlMembershipProvider, because I can not access the connectionstring...
The biggest problem with the SqlMembershipProvider is that i can't access the connectionstring because this setting comes from machine.config and app.config can override this. But i have no control over this connectionstring reader mecahnism. Or (Why is everything based on config files ) From this point, this kills the flexibility. Why isn't a public ConnectionString property, it would be so easy... Ok, I know i can write my own SqlMembershipProvider, but i don't want... Any idea Thanks, SM
.NET Development23
|
| |
|
| |
 |
Sarah Parra - MSFT

|
Posted: .NET Framework Data Access and Storage, SqlMembershipProvider, use from WindowsForms with not trusted connectionstring? |
Top |
|
| |
 |
miklos.smeja

|
Posted: .NET Framework Data Access and Storage, SqlMembershipProvider, use from WindowsForms with not trusted connectionstring? |
Top |
The solution -provider source code: blog Sorry
|
| |
|
| |
 |
| |
|