[Mono-osx] How to logon to Win or Mac using credentials through code?

Tomasz Muszyński thom at union.waw.pl
Fri Jan 23 10:55:45 EST 2009


d_v wrote:
> I tried using smb, but it does not seem to work.
> It does work if I use the Mac's Go | Connect to Server menu method however.
>
> I tried both of these path's unsuccessfully:
> sPath = "smb://192.168.0.250/Shared File Depot"; 
> sPath = "smb://user:password@192.168.0.250/Shared File Depot";
>
> dir = Directory.GetFiles(sPath, "*");
>
> The error I receive is:
> System.IO.DirectoryNotFoundException: Directory 'smb:/192.168.0.250/Shared
> File Depot' not found.   
>
> In all cases it drops the first path delim like so: "smb:/"...
> I tried "smb:////..." but with same error message.
> I tried "smb:///..."  but with same error message.
>
> (Sorry if you get this twice, I did a Reply All in my email, but it didn't
> seem to post to web or alert me)
>   

Maybe try to use Objective C Framework for file management (I don't 
remember exact name). Mono probably uses unix functions which don't 
support URL paths... I'm just guesting - check this in Mono sources.

-- 
tm



More information about the Mono-osx mailing list