|
||||||
| Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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......... |
| Sponsored Links |
|
|
|
|||||
|
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
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows XP Tricks & Tips!!!!..new ones. | pranky | Tutorials | 9 | 08-23-2008 03:22 PM |
| Transmitting video capture from server to client (Newbie) | MrNobody | Visual Basic Programming | 30 | 05-02-2008 04:18 PM |
| Access server file from client | ahpooh | Visual Basic Programming | 1 | 09-06-2007 01:36 PM |
| Delphi Sockets : Simple client and server program | tosh5457 | Pascal/Delphi | 0 | 05-26-2007 11:00 AM |
| Global variables (SERVER) | Jaan | PHP Tutorials | 0 | 03-22-2007 09:43 PM |
Goal: 100,000 Posts
Complete: 67%