|
||||||
| 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 The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
![]() |
| 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 04:22 PM |
| Transmitting video capture from server to client (Newbie) | MrNobody | Visual Basic Programming | 30 | 05-02-2008 05:18 PM |
| Access server file from client | ahpooh | Visual Basic Programming | 1 | 09-06-2007 02:36 PM |
| Delphi Sockets : Simple client and server program | tosh5457 | Pascal/Delphi | 0 | 05-26-2007 12:00 PM |
| Global variables (SERVER) | Jaan | PHP Tutorials | 0 | 03-22-2007 10:43 PM |
| WingedPanther | ........ | 2676.86 |
| Xav | ........ | 2600.5 |
| Brandon W | ........ | 1701.26 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 965.05 |
| dcs | ........ | 650.52 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 410.75 |
| chili5 | ........ | 380.6 |
Goal: 100,000 Posts
Complete: 97%