D
David Thielen
Hi;
When installing an ASP.NET application using SqlRoleProvider and
SqlMembershipProvider we need to create the initial roles and the inital
admin user from our Windows installer application (not ASP.NET).
We must do this in the installer as otherwise we either have no users and
therefore no one can log in to create users. Or we create the initial admin
user with a standard name & password which is a bad security hole.
So question 1 is what is the correct & supported way to add roles and a user
to the database after creating it from a windows forms app? I have this
working but I don't know if the way I am doing this is correct.
Question 2 is how do I set the database connection string for the
SqlRoleProvider and SqlMembershipProvider. At present I am puttile it in the
app.exe.config file and that works fine if it is right the first time.
However, if it is wrong, both classes continue to use the initial value that
they cached in a helper class.
Again, what is the correct & supported way to set the connection string? I
assume the correct way allows it to be changed as users will make mistakes.
To the MS support team, if you don't know - can you please ask the
development team for the solution? They must have one as the database does
need to be set up to start.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
When installing an ASP.NET application using SqlRoleProvider and
SqlMembershipProvider we need to create the initial roles and the inital
admin user from our Windows installer application (not ASP.NET).
We must do this in the installer as otherwise we either have no users and
therefore no one can log in to create users. Or we create the initial admin
user with a standard name & password which is a bad security hole.
So question 1 is what is the correct & supported way to add roles and a user
to the database after creating it from a windows forms app? I have this
working but I don't know if the way I am doing this is correct.
Question 2 is how do I set the database connection string for the
SqlRoleProvider and SqlMembershipProvider. At present I am puttile it in the
app.exe.config file and that works fine if it is right the first time.
However, if it is wrong, both classes continue to use the initial value that
they cached in a helper class.
Again, what is the correct & supported way to set the connection string? I
assume the correct way allows it to be changed as users will make mistakes.
To the MS support team, if you don't know - can you please ask the
development team for the solution? They must have one as the database does
need to be set up to start.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm