IIS 6 application setup

If you’re programmatically attempting to setup an IIS website and you’re calling AppCreate but ending up with a blank Application name (AppFriendlyName) it could be for one of two reasons.

  1. You called Invoke AppCreate after the CommitChanges
  2. If you’ve done 1 but doing that means the virtual directory doesn’t get turned into an application then it might be because you’ve tried to specify some of the details of the application by hand.  I was trying to specify AppPoolId and AppRoot before calling AppCreate.  When I removed that bit of code the app got created correctly and with a sensible name.

That ought to teach me not to cobble together things from lots of web articles!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s