Zum Inhalt

Kategorie: .NET

My .NET Applications

Active Directory – Supersonic and the directory searcher

Whats the difference between supersonic and the directory searcher? Nothing, because if you get over ~1000 you crash into a wall. 🙂 Last week we had to deal with the limitations on the directory searcher. We performed a user search on an organizational unit (subtree) with more than 1000 users beneath. We where astonished that our userobject only contained 1000 items every time we did the search. I wrote a little test script in powershell to reproduce this behaviour and to see if this limitation is a C# problem or not. So I wrote this script:

As expected, powershell returned only 1000 objects. Then we tried to find out why and looked at the $objSearcher property list.

As you can see, there are two interesting properties: sizelimit and pagesize. So I played around with these two properties and found some explanations for them. Sizelimit is the limit for the maximum returned results, but you can’t set this property above 1000. So I looked at the second property, pagesize. This property sets the maximum result items per returned page. So all you have to do is, set sizelimit to 0 and set pagesize to 1000 and you will get…

Weiterlesen Active Directory – Supersonic and the directory searcher

VB.NET – Enable Buttons in Applications with API calls

Every once in a while I stumble across some applications that have disabled control buttons without (for me) any reason. As a primary web developer I would like to have an easy way to enable these buttons. There exist some tools for firefox which you can enable buttons easily. For windows applications its a bit different. There are some win32 unlocker tools, but my virusscan doesn’t like those tools at all and I would like to learn how to do it on my own. I finally ended up with my IDE and some ideas on how to achieve this.
I found some tutorials on how to solve this problem with C#.net, but I haven’t installed C#.net on my box. I therefore tried to find a way to get through this with visual basic.net.

The Problem

There is a small, well known tool, that comes with Windows 7, that I use from time to time: The Calculator.
I like the windows calculator but my girlfriend mentioned that the „%“ button is disabled if you change the calculator from standard to scientific. For me, there is no reason why this button should be disabled, so I tried to find a way to enable it. Here we go.

Weiterlesen VB.NET – Enable Buttons in Applications with API calls

YDR – Office Word Document Migrator

Sinn und zweck

Da Word immer mehr zum DMS (Document Management System) verkommt, kommt es immer wieder vor, dass man viele Word Dokumente hat, die Verlinkungen zu anderen Word Dokumenten, Intranet Links, oder sonstige Verknüpfungen haben.

Es mag sinnvoll sein (oder nicht) und es funktioniert auch einwandfrei, aber nur bis zu dem Punkt, an dem man die Dokumente verschieben muss. Hier bekommt der Administrator richtig spaß und darf (je nach Anzahl der Dokumente) einen auserwählten Mitarbeiter, oder sich selbst dran setzen und die Links korrigieren.

Je nach dem, wie intensiv Word dazu verbogen wird, ein vollständiges DMS zu ersetzen können einige Tage ins Land gehen bis alle Dokumente wieder aufgefunden und verknüpft sind.

Interessant wird die Sache dann, wenn sich nicht nur der Server ändert, auf dem die Dateien liegen und man alles mit absoluten Pfaden erstellt hat, sondern sich auch die Struktur der Dateiablage ändert.
Hier wird es dann problematisch in akzeptabler Zeit Dateien wieder zu finden und diese auch zu verknüpfen.

Das Problem ist also folgendes.
Weiterlesen YDR – Office Word Document Migrator