Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-2007, 12:41 AM
ahpooh ahpooh is offline
Newbie
 
Join Date: Jan 2007
Posts: 5
Rep Power: 0
ahpooh is on a distinguished road
Default Access server file from Client

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.........
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-07-2007, 08:37 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 26
Posts: 5,978
Last Blog:
SAP, ERP and EDI
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-14-2007, 06:51 PM
ahpooh ahpooh is offline
Newbie
 
Join Date: Jan 2007
Posts: 5
Rep Power: 0
ahpooh is on a distinguished road
Default

hi jordon,
can i have the more complete source?
is it i need to define the networksecurity class myself? or how?

thanks for reply
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -5. The time now is 07:37 PM.

Contest Stats

GoogleKeyw ........ 20.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads