At work we use Active Directory.
Active Directory (AD) is a directory service that Microsoft developed
for Windows domain networks. It is included in most Windows Server
operating systems as a set of processes and services. Initially,
Active Directory was only in charge of centralized domain management.
Starting with Windows Server 2008, however, Active Directory became an
umbrella title for a broad range of directory-based identity-related
services.(source)
My first goal is to create a small lightweight windows forms application to search on firstname and lastname, using only parts of the name.
Context: I like some functionalities of this tool. But it is not open source. And I need to make changes.
And since StackOverflow does not encourage reverse engineering, I would rather write my own software ;-)
Being a Microsoft .NET developer, I started looking for Microsoft .NET libraries: Which are they?
Is this it? Or is this it? I can't seem to find any really useful tutorials or easy to use API documentation.
I have read this: Using LDAP and Active Directory with C# 101
Which shares this. But that is basically nothing much.
Hence my question: Do you know whether there is open source C# code available for download? Which supports connecting to active directory, and performing LDAP operations?
Novell is a software company providing a similar but competitive directory, and they seem to provide excellent documentation about their 'LDAP Libraries for C sharp' This got me wondering:
Could this be used to connect to 'Establish an LDAP Connection' and 'Perform LDAP Operations and Obtain Results' on Active Directory? Or should I just use Microsoft code?
Considering AD is a directory services database, and LDAP (Lightweight Directory Access Protocol) is one of the protocols you can use to talk to it.
It should be possible right?
Please share your knowledge and experience with me. I am total n00b when it comes to AD. I promise: once you get me started, I will share my beautiful code with you all.
You can try using this Novell based repository.
Related
I have an app previously written using WPF. This is used in a single physical location. The database is SQL Server (accessed with EF Core), but documents are associated with records. In the WPF app, these documents are stored on a Windows 2019 Server with domain-level authentication on an SMB share.
I've moved most of my application to MAUI which is looking really good so far. I've got EF Core working just as I want it, but I'm unsure how to access the documents on the SMB share from my Android devices. The aim is obviously as much platform-independence as possible but I'm aware that for this sort of thing I'll probably need platform specific code. The FileSystem helpers seem too high-level to achieve what I want to achieve.
How do I achieve this? I'm prepared to store documents on a secure cloud-based service but don't have a huge recurring budget.
My goal is to update the Certificate for Exchange Servers from within a C# app, just like the Enable-ExchangeCertificate PS Cmdlet does.
I've already written an updater for IIS, which uses Microsoft.Web.Administration to access and manipulate IIS Sites and Bindings. I've searched through Google and VS Libraries for Exchange API tools, but without any luck. I can only find References to EWS (Exchange Web Services), which can't update the Server Certificate AFAIK.
Is there any API that can be used? How does Enable-ExchangeCertificate provide the functionality? I'm also thinking about just using the PS Cmdlet if all else fails, but I'd like to have a standalone app to rely on. No remote server management needed, localhost-only is fine.
tl;dr How to update a local Exchange Server Certificate in C#?
EDIT I'll look further into the EWS API (https://github.com/OfficeDev/ews-managed-api/blob/master/README.md), it looks like it might do the job. It provides Assemblies to access EWS data, but I haven't found any API Calls exclusively for Certificate Management.
There are multiple parts in MS Exchange which aren´t covered by an API. Mostly this is due to security reasons or as it´s quite complex and therefore no API needed (e.g. Exchange Schema update).
The normal Microsoft way included only two steps:
Make a Backup of the current configuration & SSL cert (Optional)
Import the certificate
Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path
c:\certificates\YOUR_CERTIFICATE.cer -Encoding byte -ReadCount 0))
But some use MMC and that's working as well (so you might check for an API for MMC for this part).
Enable it
Enable-ExchangeCertificate -Thumbprint
1234ae0567a72fccb75b1d0198628675333d010e -Services POP,IMAP,SMTP,IIS
I would assume that there is no such API as its not really needed to have one. Normally an SSL certificate is valid for 3 years. So you need to run the command above 1x every 3 years and a 3rd party access to this part wouldn´t make any sense as it wouldn´t be often used and therefore Microsoft haven´t build one.
To give you more infos here. The SSL certificate information for Microsoft is saved in two locations. One in the local Regestry and one in Microsoft Active Directory (see here: uses the local instance of Active Directory Lightweight Directory Services (AD LDS) to read and write data). Dealing with changes to the ActiveDirectory without the way Microsoft supports might be VERY risky and would mean that Microsoft do not offer any support if that caused a problem. So I would use the powershell approach Enable-ExchangeCertificate in your app.
P.S. I would never ever run an unknown plugin on my Exchange server which do replace an SSL certificate which I can do via a simple powershell command. The plugin could cause a lot of other issues and can contain a lot of stuff which isn´t so "nice". So before you wast your time into that project think if there is really an audience for it.
I have a windows network (not connected to domain) and I need to provide some automation on each PC at certain time of the day. There are several tasks - launch executables, managing FS, transfering files. All this actions must be implemented via RDP, using C#. What is common approach to achieve this? I don't have experience using RDP within software. So are there .NET classes or free libraries I can use to get RDP functionality in my software. Thank you!
All the tasks you have listed relyed much more on security issues for machines within your network and a user logged-in priveledges a rather than a usage of RPD.
Within a windows domain the tasks like yours are usually delegated to ActiveDirectory administration and policies.
In case of a not Windows Domain Network you will need to use a mechanism that will be presented in following configuration:
a client installed on each particular machine under proper permissions. The client should implement a subscriber pattern.
a server installed on a "commander" machine. the server should inplement a publisher pattern.
There should be a lot of ready solution that should implement the concept of content disribution and starting specific scripts. I think that your investment in such tools research and evaluation will be much more time- and cost- effective rather than writing an app that "uses RPD functionality"
But if there is a reason that prevents usage of 3rd parties, I would go for implementaion of WCF service that will be installed on all clients. This service should be "trained" to do all your suff on client. Server side you will need an appliaction or a service that will publish events for clients or trigger known clients methods.
I want to develop PaaS like for IIS, I want users to be able to upload dll and I will host them. Those dll's will be ServiceStack services.
I want to sandbox those apis, so they can access the internet - only to certain ip's , but to limit their OS access for file system - Only for some directory that have max limit of 20mb (for example).
I know that in linux I have containers like docker that can help me do that easily, any Ideas how to do this in .NET (open source libraries for helping are more than welcomed :))
You could use Code Access Security and Trust levels for that.
Take a look at:
http://msdn.microsoft.com/en-us/library/wyts434y(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/87x8e4d1(v=vs.100).aspx
Hey guys, I was working on a simple chat program to brush up on my C#, and ran into a roadblock. I wanted to allow one computer to broadcast its location, and the other to find that computer, and display it (and any others) in a list.. Just a push in the right direction would be great,
Thanks,
Max
Mono.Zeroconf is a .NET library that provides common zeroconf opertations - service publish and discovery. It uses Apple's Bonjour for Windows as a transport on Windows.
Developers can publish services that will be exposed to other computers on the local network and also query the local machines on the network for services that could have been exposed.
See Peer-to-Peer Programming with WCF and .NET Framework 3.5.
All you need is to share destination PC. and then run your web-based application on the target pc IIS.
Updated Part :
If you have awindows application and want users use that application youhave some solution
create a Login form for your application
use from MarshalByRef object and create a Channel between user andaplication
create a MSI (setup) and run it from server (in entire Active Directory).this will install one application in each client
create a simple dot net setup. justRight click onyour windowsproject in VS and then select Publich, in the wizard walk through creating a network application
I think the last option is closest one to your request
Use AD (Active Directory)? Or some such [which would serve as] central messageboard mechanism - maybe even MSMQ?