Click here to Skip to main content
15,900,475 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to place crystalreportviewer on a perticular area of page Pin
Frank Kerrigan5-Apr-07 0:07
Frank Kerrigan5-Apr-07 0:07 
QuestionRegular expressions Pin
N a v a n e e t h4-Apr-07 23:17
N a v a n e e t h4-Apr-07 23:17 
QuestionTab Strip Pin
vengaqua4-Apr-07 22:06
vengaqua4-Apr-07 22:06 
QuestionSubmit data from a htm file to aspx file Pin
anujose4-Apr-07 21:16
anujose4-Apr-07 21:16 
AnswerRe: Submit data from a htm file to aspx file Pin
gauthee4-Apr-07 21:27
gauthee4-Apr-07 21:27 
AnswerRe: Submit data from a htm file to aspx file Pin
N a v a n e e t h4-Apr-07 22:39
N a v a n e e t h4-Apr-07 22:39 
GeneralRe: Submit data from a htm file to aspx file Pin
anujose4-Apr-07 23:18
anujose4-Apr-07 23:18 
QuestionFormsAuthentication Pin
Mkanchha4-Apr-07 20:38
Mkanchha4-Apr-07 20:38 
Hi to all,
I am trying to use FormsAuthentication in my Project but I am getting some Problems.

Code 1:

Private Sub imgbtnSubmit_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbtnSubmit.Click
Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
FormsAuthentication.SetAuthCookie(txtLoginId.Value, True)
Server.Transfer("EntrySubscriberDtls.aspx")
Else
FormsAuthentication.SetAuthCookie(txtLoginId.Value, True)
Server.Transfer("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
End If
Catch ex As Exception
'Throw error Message
txtLoginId.Value = ""
txtPassword.Value = ""
lblErrorMsg.Text = "Invalid Username or Password"
End Try
End Sub

Code 2:
Function ValidateUser(ByVal UserName As String, ByVal Pssword As String) As Boolean
Dim vsVndrPwd As String
Dim dtVendorDet As New DataTable
Try
'For cheking Valid UserName and Password
Session("Username") = userName
vsVndrPwd = Nothing
dtVendorDet = Objallschoolinfo.ValidateLogin(txtLoginId.Value.ToUpper.Trim)
iStatus = Convert.ToInt32(dtVendorDet.Rows(0).Item("bStatus"))
vsVndrPwd = dtVendorDet.Rows(0).Item("vsPassword".ToUpper.Trim)
Catch ex As Exception
lblErrorMsg.Text = ex.Message
End Try
'If Not Found the Record
If (vsVndrPwd Is Nothing) Then
Return False
End If
'if Found the Record
Return (String.Compare(vsVndrPwd.ToUpper.Trim, Pssword.ToUpper.Trim, False) = 0)
End Function

Code:3 Web.config file
<authentication mode="Forms">
<forms name=".NavinsForm" loginurl="./Vendor/VendorLogin.aspx" protection="All" path="/" timeout="30">


<authorization>
<deny users="?">
<allow users="*">


-----------------
Error: When iStatus=1 It's throw the Error:"Thread was being aborted."
When iStatus=0 It's throw the Error:"Error executing child request for ViewSubscriberDtls.aspx."


Mohan Balal
AnswerRe: FormsAuthentication Pin
Walter_H4-Apr-07 23:02
Walter_H4-Apr-07 23:02 
GeneralRe: FormsAuthentication Pin
Mkanchha4-Apr-07 23:48
Mkanchha4-Apr-07 23:48 
GeneralRe: FormsAuthentication Pin
Walter_H5-Apr-07 1:27
Walter_H5-Apr-07 1:27 
QuestionWSE 2.0 Credential Passing Technique vs Integrated Windows Authentication Pin
lokeshgupta134-Apr-07 20:09
lokeshgupta134-Apr-07 20:09 
Question[Anthem:AutoSuggestBox] Pin
samshah5124-Apr-07 20:04
samshah5124-Apr-07 20:04 
QuestionHow to Write this Query Pin
varshavmane4-Apr-07 19:46
varshavmane4-Apr-07 19:46 
AnswerRe: How to Write this Query Pin
Sun Rays4-Apr-07 19:57
Sun Rays4-Apr-07 19:57 
GeneralRe: How to Write this Query Pin
varshavmane4-Apr-07 20:07
varshavmane4-Apr-07 20:07 
AnswerRe: How to Write this Query Pin
RaghuSanta4-Apr-07 20:01
RaghuSanta4-Apr-07 20:01 
GeneralRe: How to Write this Query Pin
varshavmane4-Apr-07 20:07
varshavmane4-Apr-07 20:07 
AnswerRe: How to Write this Query Pin
Shahzad.Aslam5-Apr-07 1:48
Shahzad.Aslam5-Apr-07 1:48 
QuestionHow to creat a Multi-line grid ? Pin
vnsp4-Apr-07 19:42
vnsp4-Apr-07 19:42 
AnswerRe: How to creat a Multi-line grid ? Pin
Sun Rays4-Apr-07 19:58
Sun Rays4-Apr-07 19:58 
QuestionPayment gateway Pin
www.suniltvl.in4-Apr-07 19:28
www.suniltvl.in4-Apr-07 19:28 
AnswerRe: Payment gateway Pin
Narendra Mohan4-Apr-07 19:40
Narendra Mohan4-Apr-07 19:40 
AnswerRe: Payment gateway Pin
N a v a n e e t h4-Apr-07 22:40
N a v a n e e t h4-Apr-07 22:40 
Questionreading contents of a word document and displaying it on web page Pin
keroed_edmond4-Apr-07 16:36
keroed_edmond4-Apr-07 16:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.