Re: [ADVANCED-DOTNET] Directory Server/Domain discovery

2008-07-10 Thread Mont Rothstein
Thanks guys. Those are some great suggestions and pointers. I am going to try them out as soon as I can. James, yes when I said long name I mean distinguished name. I guess I was still in non-IT communication mode when I wrote that. Thanks, -Mont === This list i

[ADVANCED-DOTNET] Directory Server/Domain discovery

2008-07-09 Thread Mont Rothstein
I am looking for a way to get information about the domain/directory server that the current user is logged in under. I need more than the short name. I need the long name and/or the server's name/address. The problem I am trying to overcome is two domains on the same network with the same short

Re: [ADVANCED-DOTNET] Automatic synchronisation

2008-04-07 Thread Mont Rothstein
I've also successfully used BITS. The wrapper I've used is SharpBITS located here: http://www.codeplex.com/sharpbits -Mont === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.c

Re: [ADVANCED-DOTNET] Storing shared secrets

2008-03-28 Thread Mont Rothstein
For those that are curious I'll try to shed a little more light on the why of this. The scenario is actually fairly simple. An application where a given company will run multiple copies. Each instance the app needs to login to the same account (could be a share, a web service, etc.). There are

Re: [ADVANCED-DOTNET] Storing shared secrets

2008-03-28 Thread Mont Rothstein
Chay and Per, thanks for the ideas. I can't use a network sub-folder but running a service as a specific user would at least let me use DPAPI to securely store data. Even if I have to have the service pass that data to my app it would still be better than hard coding it in the assembly. I'm not

Re: [ADVANCED-DOTNET] Storing shared secrets

2008-03-27 Thread Mont Rothstein
Chris and Erik, thank you for the additional thoughts. The problem with impersonating a specific user, is that you then have to have the password for that user. Storing a salt or other key value in my assembly is what I am trying to avoid. Unless I am missing something there just doesn't seem to

Re: [ADVANCED-DOTNET] Storing shared secrets

2008-03-27 Thread Mont Rothstein
Thanks guys. I wasn't aware of DPAPI. Unfortunately it is user specific and I need something that will work for all users. What I think is needed (and apparently does not exist) is the .NET equivalent of DPAPI. Something that has a secure path from the specific version of an application to a hi

[ADVANCED-DOTNET] Storing shared secrets

2008-03-27 Thread Mont Rothstein
I am looking for a way to securely store a shared secret. This shared secret is going to be used my multiple machines and so can't be generated for each machine independently. It can of course be encrypted but then the key has to be securely stored. Ideally there would be a way to store data tha

Re: [ADVANCED-DOTNET] Robust file copy

2007-12-18 Thread Mont Rothstein
Thanks to everyone for the suggestions. I'll take a look at each of them. -Mont === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com

[ADVANCED-DOTNET] Robust file copy

2007-12-18 Thread Mont Rothstein
I am looking for a robust way to copy files across a network that has high latency and may be unreliable. Currently I use a FileStream instead of File.Copy because the source account does not have permissions on the destination drive and vis-a-versa (I impersonate accounts over the network). What

Re: [ADVANCED-DOTNET] Unknown publisher and downloads

2007-12-07 Thread Mont Rothstein
x27;t sign any of my programs :)). > > Adam.. > > -Original Message- > From: Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Mont Rothstein > Sent: Friday, December 07, 2007 4:50 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: R

Re: [ADVANCED-DOTNET] Unknown publisher and downloads

2007-12-07 Thread Mont Rothstein
they can increase their trust level of your > download. > > Adam.. > > -Original Message- > From: Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Mont Rothstein > Sent: Friday, December 07, 2007 3:56 PM > To: ADVANCED-DOTNET@DISCUSS.DEVEL

[ADVANCED-DOTNET] Unknown publisher and downloads

2007-12-07 Thread Mont Rothstein
I'm not sure if this is the correct places to ask this but I can't seem to find a more appropriate venue. We have an application that we sign with a strong name. We are using a Setup project to build the installer. If I double click the .msi on my machine, or copy it over the network to a differ

Re: [ADVANCED-DOTNET] Problems with Interop.Shell32.dll under release

2007-10-11 Thread Mont Rothstein
lwith a Debug compile but did with a Release compile. -Mont On 10/11/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: > > I am using Shell32 to get extended file properties. > > When I run our app compiled for Debug it works fine. When I run compiled > for Release I get:

[ADVANCED-DOTNET] Problems with Interop.Shell32.dll under release

2007-10-11 Thread Mont Rothstein
I am using Shell32 to get extended file properties. When I run our app compiled for Debug it works fine. When I run compiled for Release I get: Could not load file or assembly 'Interop.Shell32, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f2e3d021a3694e92' or one of its dependencies. Access

Re: [ADVANCED-DOTNET] Passing a method as a parameter

2007-09-03 Thread Mont Rothstein
Wow, thanks guys, I had no idea the 2.0 compiler did this. Thanks to everyone that replied. -Mont === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com

Re: [ADVANCED-DOTNET] Passing a method as a parameter

2007-09-02 Thread Mont Rothstein
Peter, your reply appears to have been cut off. My question for both you and Alex (thank you both for responding) is how to do this generically. Perhaps a little more detail will help. I found a bit of Microsoft code for Command Management ( http://msdn.microsoft.com/msdnmag/issues/02/10/CommandM

[ADVANCED-DOTNET] Passing a method as a parameter

2007-08-31 Thread Mont Rothstein
Is it possible to pass a method as a parameter in C#? I want to pass a method as a parameter so that I can consolidate the code for creating a bunch of delegates. I can't figure out how to do this in C#. Thanks, -Mont === This list is hosted by DevelopMentor® ht

Re: [ADVANCED-DOTNET] Warning number for obsolete

2007-08-24 Thread Mont Rothstein
inal Message- > From: Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Mont Rothstein > Sent: Friday, August 24, 2007 10:58 AM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: [ADVANCED-DOTNET] Warning number for obsolete > > I want to disab

[ADVANCED-DOTNET] Warning number for obsolete

2007-08-24 Thread Mont Rothstein
I want to disable an "obsolete" warning ('method' is obsolete: 'This property has been deprecated. Use...instead') because the vendor is using it for something other an what it was intended (the method is not actually deprecated). Does anyone know the "obsolete" warning number or where I can find

Re: [ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-30 Thread Mont Rothstein
start with underscore (_) they're almost certain cdecl, otherwise probably stdcall. On 4/30/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: > Thanks for all of the information. I'll have to dig into this more. > > The make file doesn't have a /Gd or a /Gz flag. I su

Re: [ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-30 Thread Mont Rothstein
r posters suggested that the DLL was failing internally before it allocated the struct, which could also be a cause of your problem. On Mon, 30 Apr 2007 08:44:21 -0700, Mont Rothstein <[EMAIL PROTECTED]> wrote: >Thanks for the additional info. > >I am compiling this DLL with VS 05 form t

Re: [ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-30 Thread Mont Rothstein
Thanks for the additional info. I am compiling this DLL with VS 05 form the command line. It uses a manually created make file and not a project. I didn't create the DLL, it is part of a package, which is why I am unclear on some of this. I searched the directory where all of the source is kep

Re: [ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-27 Thread Mont Rothstein
The code I am trying to essentially re-implement in C# is: FlxActErrorerror; if(flxActAppActivationSend(client, &error)) { DEBUG("ACTIVATION REQUEST SUCCESSFULLY PROCESSED\n"); } else { flxActComm

Re: [ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-25 Thread Mont Rothstein
Handle, ref error); return error; } Haven't tried it though. On 4/25/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: > I am trying to get a struct from a function in a DLL, but I always get zero. > > The below code always leaves the struct with 0 as the value for each >

Re: [ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-25 Thread Mont Rothstein
Actually it is just an entry in a def file to a C function. So, no DLL error. -Mont On 4/24/07, Steve Johnson <[EMAIL PROTECTED]> wrote: On 4/24/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: > > I am trying to get a struct from a function in a DLL, but I always get &

[ADVANCED-DOTNET] Trouble getting struct with Interop

2007-04-24 Thread Mont Rothstein
I am trying to get a struct from a function in a DLL, but I always get zero. The below code always leaves the struct with 0 as the value for each parameter in the struct though the equivalent C code populates the values. Does anyone see what I am missing? Thanks, -Mont Here is what I have: C

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-09 Thread Mont Rothstein
denied interactive logon privileges but I didn't test that. Perhaps if anyone else ever needs to know this they can avoid the pain and suffering I went through. -Mont On 1/8/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: Argh, Sorry for continually replying to myself but I'

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-08 Thread Mont Rothstein
TokenPrivileges? (Just paraphrasing Keith Brown's .net dev guide to windows security here--not really sure how any of this works...) -Original Message- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Mont Rothstein Sent: Monday, January 08, 2007 2:36 PM

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-08 Thread Mont Rothstein
is in a group). Is there some way to test to see if a user has a given privilege? Thanks, -Mont On 1/8/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: I got this working. I used LsaEnumerateAccountsWithUserRight() which returned the SIDs for the objects with the SeInteractiveLogonRigh

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-08 Thread Mont Rothstein
I may still use KBC.WIndowsSecurityUtilities if I can get ahold of it. -Mont On 1/8/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: I made some progress but then I got stuck. I used the LSA Functions project from CodeProject as a starting point and added the ability to call LsaEnumerateAccountRight

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-08 Thread Mont Rothstein
did was to take the policyHandle as returned by LsaOpenPolicy and pass it along with the sid to LsaEnumerateAccountRights. Thanks, -Mont On 1/5/07, Mont Rothstein <[EMAIL PROTECTED]> wrote: Thanks! That was the needle I was looking for. -Mont On 1/5/07, Peter Ritchie <[EMAIL PROTECT

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-05 Thread Mont Rothstein
ect.com/csharp/lsadotnet.asp; but, I don't think that actually "tests" whether an account has a particular right or not. On Fri, 5 Jan 2007 10:16:00 -0800, Mont Rothstein <[EMAIL PROTECTED]> wrote: >Yes, that is what I mean. > >Is there a w

Re: [ADVANCED-DOTNET] Identifying special accounts

2007-01-05 Thread Mont Rothstein
ome Screen--if that's what you mean by "special". I would expect (and hope) that SUPPORT_388945a0 doesn't have local login rights. On Thu, 4 Jan 2007 17:13:47 -0800, Mont Rothstein <[EMAIL PROTECTED]> wrote: >I am trying to display a list of users on the local computer.

[ADVANCED-DOTNET] Identifying special accounts

2007-01-04 Thread Mont Rothstein
I am trying to display a list of users on the local computer. I am using DirectoryEntry().Children to get all of the objects and looking for SchemaClassName = "User". I then remove any users that are in the SpecialAccounts list. However, there appears to be a way to flag accounts as special oth

[ADVANCED-DOTNET] Change application scope settings

2006-10-24 Thread Mont Rothstein
Could someone please clue me in as to how I can change application scope settings. I've looked and looked and the only reference I could find was for .NET 3.0. Is there really no way to do this?!? If so, then what is the point? Thanks, (frustrated) -Mont === Th