noob said:IF username.text = "username" and password.text = "password" Then
formmainmenu.show()
Else
Msgbox "get out ere"
End If
![]()
Innit! Keep it simple!
noob said:IF username.text = "username" and password.text = "password" Then
formmainmenu.show()
Else
Msgbox "get out ere"
End If
![]()
Dr_Evil said:Trust me - you don't need to code your own login screens, nor do you need to design your user security tables in your database. This has all been provided for already by the .Net framework.
1. There's a script that will generate all your database tables. It holds an extensive set of info for user and membership security data.
2. .Net has it's own login components. In VS2005 you can drag the Login control onto your page, which provides for entering user credentials and logging the user in. Also you can enable the "Forgotten password" mechanism.
You need to watch the video i posted earlier and have a good read on that site i posted earlier. They will help you understand how to use this stuff.
Shadez said:Like i said it might be worth looking at DrE's solution, im an old vb6 developer who has resently moved to .net and dont know everything about it.
well this is a kick your self error..... look at the quotes at the end of the string.
riddlermarc said:The only downside with the controls that come with VS2005 (if we are talking about the same thing here) is that you have to use a separate SQL Server 2005 Express db to hold the user data in. As a test I tried using a full 2005 install but it won't play ball - something in the connection string it doesn't like/isn't supported ("User Instance=True" IIRC).. something I wasn't too happy about, I was going to do a quick'n'dirty move of an internal site from classic asp to .NET 2 if this had worked without having to have a second database![]()
Really, that's not what I found :/ I had the connection working, the db was set up by running the Web Site Administration Tool but the login details pages themselves wouldn't connection to the SQL Server instance.. I put it down to the fact I was using forms authentication and for that you needed "User Instance=true" in the connection string, something that is only supported by 2005 Express. When you ran the pages, you couldn't log in..Dr_Evil said:No u don't - u can use an already existing SQL DB!
riddlermarc said:Really, that's not what I found :/ I had the connection working, the db was set up by running the Web Site Administration Tool but the login details pages themselves wouldn't connection to the SQL Server instance.. I put it down to the fact I was using forms authentication and for that you needed "User Instance=true" in the connection string, something that is only supported by 2005 Express. When you ran the pages, you couldn't log in..
One of our dba guys here looked into it too, he was stumped but maybe we were missing something obvious - got a link to further info?
Aye, the required tables were generated in SQL 2005 and the connectoin string works okay 'cause you could add/tweak users via the Admin Tools page. It was ONLY when you submit the user login from the web pages it would refuse to acknowledge it :/Dr_Evil said:did you run the script to generate the required tables in your existing database? Did you create the user login to the db and grant ownership on the security tables for that user? Did you code and test the login string properly?