HMC CreateFolder

September 9th, 2011 | by | devdog, micro$oft

Sep
09

Today I had the chance to get back to some code for CreateFolder which creates a public folder within our Exchange 2007 environment support by Microsoft’s Hosted Messaging and Collaboration frame work. I’ve been highly critical of Microsoft’s code before, and today has taken that to a new level.

Here is what I’m dealing with. First, let’s go to the documentation on TechNet:

Pretty clear that we have a few required parameters and a few optional ones to set some quotas. These optional parameters are what will soon drive me to uncontrollable rage.

Next, let’s look at the example directly from the web service. Here’s what it states we can pass:

POST /mpsws/ManagedEmail2007/Service.asmx HTTP/1.1
Host: prov01.bacon.lightedge.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://provisioning.microsoft.com/webservice/managedemail2007/CreateFolder"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CreateFolder xmlns="http://provisioning.microsoft.com/webservice/managedemail2007">
      <CreateFolderRequest xmlns="http://provisioning.microsoft.com/managedemail2007">
        <Data>
          <organization>string</organization>
          <preferredDomainController>string</preferredDomainController>
          <name>string</name>
          <path>string</path>
          <server>string</server>
          <maxItemSize>string</maxItemSize>
          <postStorageQuota>string</postStorageQuota>
          <storageQuota>string</storageQuota>
        </Data>
      </CreateFolderRequest>
      <sendCredentials>boolean</sendCredentials>
    </CreateFolder>
  </soap:Body>
</soap:Envelope>

Again, everything looks great. postStorageQuota and storageQuota are both there and seem perfectly reasonable.

So let’s actually SEND that command to the web service. Here’s the error I get back:

The element 'CreateFolder_Request' in namespace 'http://provisioning.microsoft.com/exchange2007provider' has invalid child
element 'postStorageQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'. List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'.The element 'CreateFolder_Request' has invalid child element 'postStorageQuota' . List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' .

You get this is you change PostStorageQuota to prohibitPostQuota.

The element 'CreateFolder_Request' in namespace 'http://provisioning.microsoft.com/exchange2007provider' has invalid child element 'storageQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'. List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'.The element 'CreateFolder_Request' has invalid child element 'storageQuota' . List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' .

In case you missed it, they changed the variable with in the back end server code, and failed to tell anyone that they made this change. Awesome!

This appeared only after we made the jump up to HMC 4.5 rollup 9. Before the PostStorageQuota and StorageQuota worked as expected. Needless to say, I’m less than impressed that they changed properties on me and failed to update the documentation OR the web service example. I guess figuring this out with trial by fire is the way that Microsoft expects you to learn. Thanks Microsoft!

Comments Closed

OSX Lion + LiveMeeting

August 3rd, 2011 | by | apple, micro$oft, tips & tricks

Aug
03

Today marked the first time that I had to attend a live meeting after I recently upgraded my primary workstation to OSX Lion. Unfortunately, it wasn’t the smoothest experience.

Typically, Safari renders these meetings the best so it is my go to browser for meetings. Unfortunately, I would get the prompt for trusting the java app and a window would load with nothing happening. Same with Chrome. Firefox actually rendered the window with a Java loading icon spinning for all its worth, but never actually loading the meeting.

So, bail and go to my VDI. Now, I use my VDI for 2 things, powerCLI and VMware access. Its pretty bare bones. I found out that it didn’t even have java to join the web meeting that way. Live Meeting actually told me my version of Internet Explorer was not compatible even after installing java. Seriously Microsoft? I ended up installing the live meeting client and was into the meeting 15 minutes after the start. Yeah for productivity.

So surely I wasn’t the first one to trek down this path of Live Meeting plus OS X right? Correct! This post outlines the issue fully AND the solution. Here it is if you want to avoid a click:

All I did was go to Java Preferences (under Utilities) and on the Advanced Tab, ensure that the last option on the list “Verify mixed security code (sandbox vs. trusted)” is set to “Enable – run with protections, no warnings”. This is probably what was causing Java to hang before opening the session.

So there it is. I figured I ran into it, others surely would as well.

3 Comments »

Bing!

January 8th, 2010 | by | in the news, micro$oft

Jan
08

Recently we had a pretty funny conversation with our Microsoft premier support tech. It was clear that a memo had gone out from up above and he was doing his part to push bing out to everyone that he could. Unfortunately, he forgot he was talking to engineers. We’re smart ass bastards and he should know better.

The conversation went something like this.

Tech: Have you guys tried Bing yet?

Us: Yeah, but I don’t see us switching anytime soon. Google is still the better search engine.

Tech: Really guys? I haven’t found that to be the case. Bing has been really great!

Us: Ok, let’s do an experiment shall we, Go to bing and search for “Exchange 2007 SP2 rollup 1 download”. You’ll find a bunch of blogs talking about the download, but not the actual download page itself. Now go to google, type in the same thing and hit the “I’m feeling lucky” button.

At the time of this conversation, the “I’m feeling lucky” link took you straight to the download page, the bing results did NOT have the download page listed on their first page of results.

Tech: Oh, yeah…I guess we have some things to work out.

Us: We’ll try again once Microsoft figures out how to index their own site.

Unfortunately, that conversation happened a couple of months ago. The results are getting a little bitter for bing, but google is still the king of search.

Comments Closed

HMC Resource Management

January 5th, 2010 | by | micro$oft, tips & tricks

Jan
05

Today I’m going to talk about the wonderful thing that is the Resource Manger for HMC (Hosted Messaging and Collaboration), the wondering framework from Microsoft for provisioning users for Exchange, OCS and SharePoint automagically.

Now, we tend to do things a bit differently at my current job. For example, I’m pretty sure I’m the only developer in the US that is hitting HMC (again, a Microsoft product) with PHP hosted on our linux based customer portal. That’s right, the Unix guys is the lead developer hitting a very Microsoft-centric product. Normally this would be done by a .Net developer.

So what does the Resource Manager give you? Well, the resource manager allows you to add, edit, remove mail databases for use on the system in the Exchange world which is what we are mainly going to focus on. When you first setup these resources, you set certain parameters for the mail stores. Do you want the domains on there to be tightPack or minStoreCount. TightPack attempts to use the smallest number of mail stores. MinStoreCount attempts to minimize the number of stores allocated to each org. We have gone with the minStoreCount model as we want to have all the users of the same domain live on the same store if possible.

Which is good in theory, but Microsoft has an extremely poor implementation of this.

Here’s an example. There is a domain on our system. The users used to live in 2 mail stores. We moved the users, through HMC calls, to all live in the same mail store. Now, when we create a new user, we do not specify the mail store. We rely on HMC and the resource manager to put the user in the correct location. Unfortunately, Microsoft drops the ball big time here. Instead of putting the user on the correct mail store with the other 30 accounts, it instead picks the old store that has no users on it. It fails to figure out that the mail store has been abandoned by that domain and continues to put users there.

Nice right?

So how do we get around this? Simple, write our own and tell them exactly where to put it. Yes, that’s right, recreating the wheel. Well all know we don’t need a rounder wheel. But in this case, we’re actually improving the functionality of the system.

I can’t go into the detail of how we actually implemented our system. But I can tell you, its already paying off by putting the users in the correct location.

But but but…is that it? Is that all you really solved? Do you really care if the users are spread out? Well, yeah, we do. We want them to be in the same mail store to help save on space for those messages that have the same attachment that went out to every users in the organization. Its not going to save you a ton of space, but it does save a lot more than you think it does.

But the placing of users isn’t the only improvement that we got from writing our own resource manager. One lacking feature of the resource manager is the ability to mark mailstores as non provisionable. I’m sure I’m going to get someone from Microsoft telling me that yes you can, there is a bit you can flip. And I’m here to tell you, they’re right, but they completely missed the boat on actual implementation.

It is true, you can mark a mail database as non provisionable. However, when you create a new user, HMC will ask which databases the domain lives on and picks one of them. note, it doesn’t query for all the databases that are provisionable, it asks for ALL of them for the domain. There is a chance, a very GOOD chance that HMC may automatically pick one of the stores that you have marked as not provisoinable. Awesome I know.

So how do you get around this little gem. Well, you can mess with the resource manager as we ran for a while. We had a script that would run daily and check a list of databases that we had marked to not have new users on them. Then it would check out the free space on the system and mess with the resource manager basically tricking the resource manager that it would be out of space. This had the same effect of not having new users allocated to it on the system as the resource manager would at least check to see if there was enough space on the database when putting a user on there. But even this had its drawbacks. For example, what if you have a system setup where you have plans in place where a user can have a 1GB, 2GB and 4GB mailbox. They have the 1GB plan and want to upgrade. Guess what, if the datastore doesn’t think that there is any more space on the drive, you you CANNOT upgrade them. Why in the world would you ever want someone to upgrade their account and spend more money with you. Crazy talk I know.

I’m sure you’re thinking, how in the heck did you ever come up with these crazy ways of mail database retirement. These suggestions came from Microsoft themselves. Even our premier tech support guy (who is awesome btw) didn’t know that these changes would cause such ass ache. Its like they never ran into a situation where someone would want to mark a database to not have any more new users allocated to it.

Our solution, write our own resource manager. not for the weak of heart, but I’m also not a pansy when it comes to this sort of thing. What we have done is put in place a system that keeps track of where each user, domain and mail store is located, how many users per store and where each domain lives. We can easily query this for the best place to put a user, but also the best place to put a user even if you have retired all the stores that the domain lives on, the system is smart enough to place the user on a new datastore for that particular domain. now when a new user is created, our provisioning system queries the resource manager, gets the appropriate store and we put that once “optional” parameter in HMC in the request XML and basically bypass the pile of shit resource manager that Microsoft has given us.

I’m sure that the big boys out there in this space will laugh at this post. I’m sure that they are way past where we are at. Or they have a bigger team that ran into this problem and put in their own solution. But if you happen to be starting out and are relying on the HMC resource manager, you might want to think again on that one. Eventually, you’ll write your own.

Comments Closed