Last post May 03, 2015 12:06 PM by chandruindia
Apr 29, 2015 09:20 AM|chandruindia|LINK
1 .I had created an asp.net Authentication with SQL database also with Role enabled.the intranet application works fine in all authentication manner.
2.Then i wite the same application in vb.net windows stand alone module and tried to use the same form authentication for this application too. so make
all necessary steps accordingly , like web.config settings, and in visual studio , application properties,set my authenication service location as :
also the same to role service location and web settings location. then i imported the followings :Imports System.Globalization
on my login page then in my login click event : i just try that login form worked or not.
Dim msg As String = ""
If Membership.ValidateUser(UsernameTextBox.Text, PasswordTextBox.Text) = False Then
MsgBox("Invalid User ID or Password!")
If Thread.CurrentPrincipal.IsInRole("FrontOffice") Then
msg = "Frontoffice"
Catch ex As Exception
i got error like near in password box: @propvalue:string truncation: max=256,len=271 value="aspxformsauth--343487382372 bla bla numbers....
. I tought it may be due to SSL port so changed my intranet that able to run on SSl port..stil i have the same issue...what wrong? shall i need to encrypt the password text box
into before authnticate?..if yes how to do? please help
Apr 30, 2015 02:05 AM|Zhi Lv - MSFT|LINK
Will you please explain more details about the error message? From your code and description, I suppose you want to create a role-based authorization application. If that is the case, you could refer to this articles:
May 03, 2015 11:02 AM|chandruindia|LINK
Thank you for response and giving links
please find the screenshot of the error: https://onedrive.live.com/redir?resid=C9408F3890D7E968%21223
mean while I will also check and work arrond the link you provided me.
May 03, 2015 12:06 PM|chandruindia|LINK
Thank you for response. Kindly close our conversation . Now the problem solved. I did change my web.config as :
and remove the cookie parts from authentication with only validate user
If (Membership.ValidateUser(UsernameTextBox.Text, PasswordTextBox.Text)) Then
' FormsAuthentication.RedirectFromLoginPage(UsernameTextBox.Text, True, "d:\chandru\cookie")--->I removed this one
MsgBox("Welcome " + UsernameTextBox.Text)
Thanks and Regards