hi all,
i having a problem to access server folder.
i got one folder inside server, which i already shared.
but when i access that folder fail.
dim host as string = "\\serverId\folder\file.xml"
doc.Load(host)
.....
error :System.IO.IOException = {"Logon failure: unknown user name or bad password.
how i pass the user name and password?
any one help please.........
You need to impersonate a user:
Code:Dim impContext As WindowsImpersonationContext = Nothing Try impContext = NetworkSecurity.ImpersonateUser("mydomain", "Username", "password", LogonType.LOGON32_LOGON_NETWORK, LogonProvider.LOGON32_PROVIDER_DEFAULT) Catch ex As ApplicationException impContext.Undo() Response.Write(ex.Message) End Try
hi jordon,
can i have the more complete source?
is it i need to define the networksecurity class myself? or how?
thanks for reply
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks