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





PostPosted: .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:

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 Development27  
 
 
Sarah Parra - MSFT





PostPosted: .NET Framework Data Access and Storage, SqlMembershipProvider, use from WindowsForms with not trusted connectionstring? Top

I would suggest posting this on the ASP.NET forums, as this is specific to SqlMembershipProvider, and not ADO.NET itself.

Try this one: http://forums.asp.net/25/ShowForum.aspx

Thanks,
Sarah



 
 
miklos.smeja





PostPosted: .NET Framework Data Access and Storage, SqlMembershipProvider, use from WindowsForms with not trusted connectionstring? Top

The solution -provider source code: blog
Sorry