This page has moved. You will be automatically redirected to its new location in 10 seconds. If you aren't forwarded to the new page, click here.

Search This Blog

Monday, September 28, 2009

Anonymous access in server 2008 IIS

goto Default Website -> Authentication -> Anonymous Authentication (set enable/disable)

System.DirectoryServices.DirectoryServicesCOMException: Logon failure: unknown user name or bad password.

http://stackoverflow.com/questions/400872/c-active-directory-check-username-password

Resolved my issue by using "Imports System.DirectoryServices.AccountManagement"
Project was working well in XP but not in Windows 7

Replaced:

Dim domainEntry As DirectoryServices.DirectoryEntry
Dim searcher As DirectoryServices.DirectorySearcher
Dim results As DirectoryServices.SearchResultCollection
Dim domainLogin As String
Dim fullName As String

domainLogin = User.Identity.Name

'Strip off domain prefix
domainLogin = domainLogin.Substring(domainLogin.IndexOf("\") + 1, domainLogin.Length - domainLogin.IndexOf("\") - 1)

domainEntry = New DirectoryServices.DirectoryEntry("LDAP://domainname.com", "domainname\username", "Password")
searcher = New DirectoryServices.DirectorySearcher(domainEntry, "(SAMAccountname=" + domainLogin + ")")
results = searcher.FindAll()


with:

Dim domainEntry As DirectoryServices.DirectoryEntry
Dim searcher As DirectoryServices.DirectorySearcher
Dim results As DirectoryServices.SearchResultCollection
Dim domainLogin As String
Dim fullName As String

domainLogin = User.Identity.Name

'Strip off domain prefix
domainLogin = domainLogin.Substring(domainLogin.IndexOf("\") + 1, domainLogin.Length - domainLogin.IndexOf("\") - 1)
Dim context As PrincipalContext = New PrincipalContext(ContextType.Domain)
Dim foundUser As UserPrincipal = UserPrincipal.FindByIdentity(context, "username")
domainEntry = CType(foundUser.GetUnderlyingObject(), DirectoryEntry)

searcher = New DirectoryServices.DirectorySearcher(domainEntry, "(SAMAccountname=" + domainLogin + ")")
results = searcher.FindAll()

Login failed for user ''. The user is not associated with a trusted SQL Server connection

http://support.microsoft.com/kb/555332

Thursday, September 17, 2009

Monday, September 7, 2009

Blog Module with DNN 5.1.2

Blog Module and some other modules are not available with DNN 5.1.2 because it is a new release; so I would suggest people who require more modules to use DNN 4.9