sqlrole manager dynamically add a connection string and or provider
how can I add a connection string dynamically to role manager?
I'm using asp.net mvc 3 with forms authentication and since this is SAAS app the connection string for each client will change dynamically now I can create new datacontext based on dynamic connection string but is there a way to provide same connection string to role manager?
currently rolemanger is configured using web.config as follows (example only not actual file)
<roleManager enabled="t开发者_JAVA技巧rue">
<providers>
<clear />
<add connectionStringName="blahblah">
</roleManager>
This post and this post seem to be doing exactly that (If I understand your post correctly).
Basically it's using the ConfigurationManager class to modify the connectionstring, or any value for that matter, of the web.config
Hopes this leads you in the right direction.
精彩评论