|
Encryptiing can be donw in lots of ways.There are simple and too many complicated encryption algorithm available throughiut the net.But probably in ur case u can use the basic and simplest algorithm like converting the character to ASCII or something like that.U can check the forum in my site for a sample encryption done in classic ASP.
www.codepal.co.nr
Regards
Bino Bose
http://www.codepal.co.nr
|
|
|
|
|
hi everyone,
I am getting user information from active Directory(AD).
it works very good from my system(PC).but if i try from any other system(PC) of our network.it doesnt display anything.
I have a complete application in my localhost under inetpub/wwwroot.
now i am trying to run this application from different computer. as like http://bhuraa/intraApp/ where bhuraa is my computer name and IntraApp is application name.It starts application but doesnt display my information.which i get from my PC(System).
code is given below.
please help me.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblmail.Text = GetUserInfo(Request.ServerVariables("REMOTE_USER"), "mail")
end sub
Public Function GetUserInfo(ByVal inSAM As String, ByVal inType As String) As String
Try
Dim sPath As String = "LDAP://RCJY01DC01"
Dim SamAccount As String = Right(inSAM, Len(inSAM) - InStr(inSAM, "\"))
Dim myDirectory As New DirectoryEntry(sPath)
Dim mySearcher As New DirectorySearcher(myDirectory)
Dim mySearchResultColl As SearchResultCollection
Dim mySearchResult As SearchResult
Dim myResultPropColl As ResultPropertyCollection
Dim myResultPropValueColl As ResultPropertyValueCollection
'Build LDAP query
mySearcher.Filter = ("(&(objectClass=user)(samaccountname=" & SamAccount & "))")
mySearchResultColl = mySearcher.FindAll()
Select Case mySearchResultColl.Count
Case 0
Return "Null"
Exit Function
Case Is > 1
Return "Null"
Exit Function
End Select
mySearchResult = mySearchResultColl.Item(0)
myResultPropColl = mySearchResult.Properties
myResultPropValueColl = myResultPropColl.Item(inType)
Return CStr(myResultPropValueColl.Item(0))
Catch ex As System.Exception
End Try
End Function
waiting for poisitve reply.
ASIF
-- modified at 1:46 Monday 22nd October, 2007
|
|
|
|
|
Hi the follwoing code i used for my user control tab events...,
See in that code,i have said the tabs and its subtabs and its url refer sites...,
Now my quest is...,
I like to view the tabs based on the user entry...,
It means i have 2 tables in one table i have said the userid,pagenum..,
Another table i said pagenumber,pagename & pageurl...,
Now using the following code how to display the tabs,sub tabs and its url instead of display static how to dispaly dynamic(based on userid)??????,...
Plz help me,
My static code follows here :
'Adding here main tabs
Dim _Text As ArrayList = New ArrayList
_Text.Add("Admin")
_Text.Add("Guest")
Dim ts As JQD.TabStrip = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text
Dim _SubTabText As Hashtable = New Hashtable
'Adding here Sub tabs for that Admin (main) tab
_Text = New ArrayList
_Text.Add("Admin User Login")
_Text.Add("Admin Default Page")
_SubTabText.Add(0, _Text)
'Adding here Sub tabs for that Guest (main) tab
_Text = New ArrayList
_Text.Add("microsoft")
_Text.Add("oracle")
_SubTabText.Add(1, _Text)
ts.SubTabTextCol = _SubTabText
AddHandler ts.SelectionChanged, AddressOf Me.ts_SelectionChanged
Private Sub ts_SelectionChanged(ByVal sender As Object, ByVal e As JQD.TabStrip.SelectionChangedEventArgs)
'Assigning links for that sub tabs
Dim TabPos As Integer = e.TabPosition
Dim SubPos As Integer = e.SubTabPosition
Select Case (TabPos)
Case 0
If (SubPos = 0) Then
src = "Admin1.aspx"
End If
If (SubPos = 1) Then
src = "Admin2.aspx"
End If
Case 1
If (SubPos = 0) Then
src = "Guest1.aspx"
End If
If (SubPos = 1) Then
src = "Guest2.aspx"
End If
End Select
Session("src") = src
End Sub
Regards,
Magi
|
|
|
|
|
I am still learning ASP .NET and going through a book. I have a login control and I can login and everything. However, I can check Remember Me and it simply does not. I even set visiblewhenloggedon to false and refreshed the page and the control is still there with nothing in the username/password fields. Does remember me only supposed to store the username when you visit again or is it actually supposed to log you in? The book doesn't really mention this too much but was more of experimentation. Thank you.
|
|
|
|
|
Have you set the [redirect to] page of the login control?
|
|
|
|
|
Recently I developed a website using asp.net and SQL Express. The database file is uploaded into App_Data folder. The website is using two membership providers, one is SqlMemership provider with default name AspNet…. With such configuration:
<membership>
<providers>
<clear>
<add connectionstringname="LocalSqlServer" enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="true" requiresuniqueemail="false" passwordformat="Hashed" maxinvalidpasswordattempts="500" minrequiredpasswordlength="7" minrequirednonalphanumericcharacters="0" passwordattemptwindow="1000" passwordstrengthregularexpression="" applicationname="/" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<add connectionstringname="LocalSqlServer" enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="true" requiresuniqueemail="false" passwordformat="Hashed" maxinvalidpasswordattempts="500" minrequiredpasswordlength="7" minrequirednonalphanumericcharacters="0" passwordattemptwindow="1000" passwordstrengthregularexpression="" applicationname="/" name=" MySqlMembershipProvider " type="MyProviders.MySqlMembershipProvider">
The second provider is my own override of Microsoft toolkit provider's sample with some extra features. The both are using the same schema and everything.
But the problem: Sometimes (not always) you can not login though your security information is correct. And the most weird thing is when I want to use Membership.ValidateUser in those times It gives me following error:
System.InvalidCastException: Specified cast is not valid. at System.Data.SqlClient.SqlBuffer.get_Int32() at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i) at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) at System.Web.Security.Membership.ValidateUser(String username, String password) at ….
But when I reset IIS or SQL Express It works!!!!!!!!!!!!!
Does anybody have an idea?
|
|
|
|
|
Looking for some quick info from those of you in the know. I am currently working with .net 2 (VS 2005) and mssql 2005 to complete all of my projects but for cost reasons might be forced to use MYSql instead.
As anyone who uses my current setup you will know that there is plenty of integration between msql2005 and VS. I would like to get a general overview of the pros and cons of moving to Mysql before I attempt it.
Thanks in advance
|
|
|
|
|
Why not use SQL Server Express Edition ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It's shared hosting so there's no choice! MSSQL full blown or the latest MYsql
|
|
|
|
|
sir m doing my final year engg project on "Application monitoring " where in there are 30 clients on the LAN . My work is basically like this :
1) create a server for all those 30 hosts.
2) have to desgin a utility such tht different privilges are assigned to each of the host who use a particular application ..say an excel sheet which contains the important data of the organization .
3) i shld be able to show tht which clients are logged in and which files they are using and modifying .
4) all the data of organization , which is in excel sheets have to be loaded in the oracle database.
5) i shld be able to generate the various type of reports .
6) developing a utility such tht various user can communicate over the LAN ..kind of LAN messenger
The thing is ..i don know exactly which platform to use .. i was considering ASP.NET and oracle for it . but i don have a clue of wht to be done next . can i get sum guideline as to how should i proceed , what platform should i use .
i will be very grateful if u can help me at the earliest
neha
|
|
|
|
|
cool_neha wrote: i was considering ASP.NET and oracle for it . but i don have a clue of wht to be done next
How is it that you're doing your final project, but you have no idea how to do it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
actually sir , it was my initiative for the organization to help them in the development of there software , the problem is that , the people who work there
don have a clue of software development , so as a "internal guide" i don expect any guidance from them . Moreover , i am doing a kind of feasibility study on this problem , to see its complexity level , so tht is why m not aware of what platform to choose ..since i have to include networking , security , database and the project is a real time , which if successful will be deployed in the organization .so i will be pleased if u can guide me .
neha
|
|
|
|
|
Neha, if its kind of temp application better u use Windows based application rather than Web based and i guess u shud use C# for that matter, since its the best.
www.codepal.co.nr
Regards
Sean Archer
http://www.codepal.co.nr
|
|
|
|
|
Thank you sir for the reply , no actually its not a temporary software, i have the task to develop a full fledged application for the concerned organization . yea i think ur suggestion is right , i should go for windows based application . i want to know , if VB.NET will be fine or not . actually i have to include Networking , Database , security and the application is a real time , so if u could guide a bit , it will be very nice of u .
neha
|
|
|
|
|
Hi Guys
Need Help here!
I am using timer to run some logic function and process but however in the end of the logic, i need to use the response function to redirect or download files. However the response function hit an error
Anyone know how to resolve this issue as i need help urgently
Thanks a Million
KaKaShi HaTaKe
|
|
|
|
|
|
I assume this is a javascript problem with a timer on the client ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear ALL,
i need to have a button which is requireed to fire a function of my choice upon click from the gridview control.
Actually I Want to get the row index or the unique key of the row to be passed as parameter to my function.
So Far I have been able to get buttons to fire sql commands but not to fire my own .net function
Thank you!
Nauman
"Mess with the Best, Die like the rest"
|
|
|
|
|
u can use e.rowIndex
www.codepal.co.nr
Regards
Sean
http://www.codepal.co.nr
|
|
|
|
|
i want to save some flage in the Application
as Application["ID"];
i want to delete this Flag when the session ends
but when the user clicks (X) button in the browser the Session_End lates
i heared that Session.TimeOut is 20 minutes as Default.
i dont have problem when the user Clicks SignOut coz i will delete the Flag immediatly.
how can delete this flag immaediatly when he Clicks (X).
the whole purpose is to prevent the users to log in from defferent Sessions at the same time
regards
|
|
|
|
|
You can use AJAX to tell you when a user closes the browser. That's your only option. It won't work if the computer loses power, then you can't do anything.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
go for Ajax
Regards
Sean
http://www.codepal.co.nr
|
|
|
|
|
dear sir,
i want to store images in database, how can i store and retrive it???
if u have any code for this plz send me soon. this is very argent. i need c# code.
thanks..................
yogesh
|
|
|
|
|
It's argent. I see. Well, first of all, if you typed this question into google, you'd get your answer. However, if you want to show your images on a website, they need to exist in the file system, so you probably need to store paths to local files in the DB, not the image data.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
sir i have code for it in only c#, i am not able to implement this code in asp.net(c#), so any suggesion for it if give me
yogesh
|
|
|
|