Last post May 08, 2006 03:56 PM by dfrauzel
May 05, 2006 02:19 PM|dfrauzel|LINK
I'm using the Consolidated Server Deployment guide, which includes the MPSSampleCP app. I'd like to customize it (we host Citrix as well as Exchange and web), and more than just the ASCX files - I'd like to change the code-behind as well, if that's possible.
I have pretty extensive experience programming in other languages, but none in C# (and only a little in C++). So I'm guessing through a lot of what I need to do, and making pretty good progress, but I can't quite get MPSSampleCP to work after I've recompiled.
(I get thrown to Error.htm.)
Could anyone provide me a basic set of instructions on how to recompile this application? Do I *need* to use the VS IDE, or could I use for example #develop? Is it possible to compile it with the 2.0 framework? Is there a specific version of ActiveDs I need
to have on my system?
Any help appreciated. Thanks.
May 08, 2006 03:56 PM|dfrauzel|LINK
I figured it out. Maybe this is all very trivial for an experienced C# programmer, but being a sysadmin my background only gives me just enough know-how to grope at these things, and figure it out as I go along. (MSDN and a thorough understanding of AD are
all you really need for some quick hacks, after all.) So, here's some documentation for the posterity of any other sysadmins in a similar position.
With #develop specifically, I found I had to do two things. Neither was really specific to #develop, but I'll describe them in terms of that program, since it's the best free IDE I could find for C#, and I'd recommend it to anyone already familiar with powerful
IDEs like Borland's or Microsoft's.
1) A "reference" to ActiveDs.dll is needed. Several functions in the sample CP use this library. I was able to add this reference in two different ways, but one of them doesn't work.
1a) References can be added by right-clicking the References folder in the Projects pane on the left side. (Or, Project menu, Add Reference.) From the dialog that opens, the tempting choice is to use the COM tab, where ActiveDs.tlb is already listed. This
method won't work. It's a different version of ActiveDs, at least on my system, than the one the project appears to expect.
1b) Instead, use the .NET Assembly Browser tab in that dialog, hit Browse, and locate the pre-compiled Interop.ActiveDs.dll file in the project's bin folder.
2) MPSSampleCP is a .NET 1.1 application. #develop wants to default to 2.0, and even with the 2.0 framework installed on my target system (FE01), the app refused to run. So I had to get #develop to target 1.1 instead. This is done from the Project menu,
Project Options, Compiling tab, Target Framework drop-down.
Hope this helps. If anyone does have some feedback or other experiences to share on customizing MPSSampleCP, I'd be interested in hearing what you have to say.