[Mono-osx] How to logon to Win or Mac using credentials through code?
d_v
dan.vandermolen at figpsoft.com
Fri Jan 23 10:30:40 EST 2009
Matt Emson wrote:
>
> d_v wrote:
>> I should be more specific, besides I have not heard any ideas yet :)
>>
>> When I say "logon" I really mean that I am trying to copy a file over the
>> network and I would like to supply the username and password and
>> (domain). At this point I don't even know if a Mac requires a domain
>> name...
>>
>> If you can point me in the right direction I would be grateful. even a
>> link/bone :)
> Doesn't look like there's a lot of a chance that'll work as it just a
> load of P/Invokes to a Windows specific library. Does Wine implement the
> library? Otherwise, what, exactly, are you trying to do? Copy a file
> across a network using a specific protocol? Copy between Windows/SAMBA
> shares? I would put forward that using Sockets would be simpler. Also,
> using Remoting and file streams is possible, though security is still an
> issue (but not tied to Win32 platform specific DLL's). A Mac does not
> have a "domain" in the Windows sense of the word, at best it'll have
> some kind of Windows domain emulation (or workgroup) via the SMB/CIFS
> protocols implemented within it (hint, just as you can do
> smb://myserver, cifs://myserver works too - not sure if they use the
> same subsystem, but it works much the same in Leopard.) A "lowest common
> denominator", such as a socket server, would work more successfully IMO.
>
> M
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
I would love to see an example of using socket server.
And an example or llink of how to do impersonate to get remote network files
in a more managed .NET way. Like maybe using the NetworkCredential object
for network files???
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)
--
View this message in context: http://www.nabble.com/How-to-logon-to-Win-or-Mac-using-credentials-through-code--tp21591295p21626542.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list