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, 01:41 AM
ahpooh ahpooh is offline
Newbie
 
Join Date: Jan 2007
Posts: 5
Credits: 0
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, 09:37 AM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,162
Last Blog:
Ext JS or Ext GWT
Credits: 1
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
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
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-14-2007, 07:51 PM
ahpooh ahpooh is offline
Newbie
 
Join Date: Jan 2007
Posts: 5
Credits: 0
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 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


All times are GMT -5. The time now is 01:50 PM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads