{"id":23,"date":"2008-09-14T16:14:21","date_gmt":"2008-09-14T13:14:21","guid":{"rendered":"http:\/\/www.notsayfam.com\/?p=23"},"modified":"2008-11-28T00:18:23","modified_gmt":"2008-11-27T21:18:23","slug":"31-revision","status":"publish","type":"post","link":"https:\/\/www.notsayfam.com\/?p=23","title":{"rendered":"VB.net LDAP(active directory) \u00fczerinden SID de\u011ferini al\u0131p Stringe d\u00f6n\u00fc\u015ft\u00fcrmek"},"content":{"rendered":"<p>\u2018SecurityIdentifier i\u00e7in gerekli k\u00fct\u00fcphane<br \/>\nImports System.Security.Principal<br \/>\nImports System.Text<br \/>\nImports System.DirectoryServices<br \/>\nPrivate Sub adkullaniciadi_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles adkullaniciadi.LostFocus<br \/>\nsid.Text = \u201c\u201d<br \/>\nDim objDe As New DirectoryEntry(\u201dLDAP:\/\/127.0.0.1\u00a8, \u201cLDAP KULLANICIADI\u201d, \u201cLDAP SIFRE\u201d)<br \/>\nDim searcher As New DirectorySearcher(objDe)<br \/>\nsearcher.Filter = \u201c(&amp;(objectClass=user)(SAMAccountName=\u201d + adkullaniciadi.Text + \u201c))\u201d<br \/>\nsearcher.PropertiesToLoad.Add(\u201dobjectSid\u201d)<br \/>\nDim Results As SearchResultCollection = searcher.FindAll()<br \/>\nFor Each Result As SearchResult In Results<br \/>\nDim Rpc As ResultPropertyCollection = Result.Properties<br \/>\nFor Each [Property] As String In Rpc.PropertyNames<br \/>\nFor Each Value As Object In Rpc([Property])<br \/>\nsid.Text = SIDtoString(Value)<br \/>\nNext<br \/>\nNext<br \/>\nNext<br \/>\nIf sid.Text = \u201c\u201d Then<br \/>\nMsgBox(\u201dActive Directory Kullan\u0131c\u0131 Ad\u0131n\u0131 Kontrol Edin\u201d, MsgBoxStyle.Critical)<br \/>\nEnd If<br \/>\nEnd Sub<br \/>\nPublic Shared Function SIDtoString(ByVal sidBinary As Byte()) As String<br \/>\nDim sid As New SecurityIdentifier(sidBinary, 0)<br \/>\nReturn sid.ToString()<br \/>\nEnd Function<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2018SecurityIdentifier i\u00e7in gerekli k\u00fct\u00fcphane Imports System.Security.Principal Imports System.Text Imports System.DirectoryServices Private Sub adkullaniciadi_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles adkullaniciadi.LostFocus sid.Text = \u201c\u201d Dim objDe As New DirectoryEntry(\u201dLDAP:\/\/127.0.0.1\u00a8, \u201cLDAP KULLANICIADI\u201d, \u201cLDAP SIFRE\u201d) Dim searcher As New DirectorySearcher(objDe) searcher.Filter = \u201c(&amp;(objectClass=user)(SAMAccountName=\u201d + adkullaniciadi.Text + \u201c))\u201d searcher.PropertiesToLoad.Add(\u201dobjectSid\u201d) Dim Results As SearchResultCollection = searcher.FindAll() For Each &hellip; <a href=\"https:\/\/www.notsayfam.com\/?p=23\" class=\"more-link\">Okumaya devam et<span class=\"screen-reader-text\"> &#8220;VB.net LDAP(active directory) \u00fczerinden SID de\u011ferini al\u0131p Stringe d\u00f6n\u00fc\u015ft\u00fcrmek&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13],"tags":[57,58,17],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-programlama","category-vb-net","tag-sid","tag-sidtostring","tag-vbnet"],"_links":{"self":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":1,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}