armenrz Posted April 29, 2004 Posted April 29, 2004 Hi All, I am developing a web project that use Forms Authentication and SQL Server. Instead of storing users and passwords in a table, I am going to use SQL Server Users account. The connection string will be created on the fly by concatenating with user name and password supplied from Login page. strConn = "provider=SQLOLEDB;server="DINO";database="MyShop";uid=" & m_UserName & ";pwd=" & m_Password & ";" m_Cnn = New OleDbConnection(strConn) m_Cnn.Open() If opening connection is successful then user is authenticated. Now is it secure enough to do this way ? Thanks. Armen Quote
bungpeng Posted April 29, 2004 Posted April 29, 2004 In this case the permission is very important, because the user can use SQL Enterprise Manager to connect to database and do whatever base on his user permission. I don't think it is secure. Quote
Administrators PlausiblyDamp Posted April 29, 2004 Administrators Posted April 29, 2004 This method will also prevent ASP.Net from being able to pool SQL connections and as such could cause performance issues Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Arch4ngel Posted April 29, 2004 Posted April 29, 2004 General advice ? don't do that :p Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
akiaz Posted April 29, 2004 Posted April 29, 2004 General advice ? don't do that :p Strongly agree. Besides, when you store user profiles in a table in your database, you can then do other things like logging user logins/logouts, and also link your users table to a permissions table for enhanced security. Where I work, we take advantage of SQL server for handling user login and have a stored procedure even generate our security token for our web applications. This token, actually a GUID generated using the NEWID T-SQL function, is stored in the user profile table and is passed around in the URL in our web applications. Just my 2 cents, but I hope that helps. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.