]> btstask.exe - Unexpected directory entry of type IIsObject 🌐:aligrant.com

btstask.exe - Unexpected directory entry of type IIsObject

Alastair Grant | Friday 4 December 2015

It's rare that I need to do this, but I was manually packaging up a web-directory into the BizTalk resources for an application using btstask.exe, and I was presented with a slightly confusing error message:

Error: Failed to add resource (Luid="System.BizTalk:WebDirectory", Type="/xxxx/yyyy").
Serializing resource (-Type="System.BizTalk:WebDirectory" -Luid="/xxxx/yyyy") failed.
Unexpected directory entry "IIS://localhost/W3SVC/1/ROOT/xxxx" of type IIsObject.

After minutes of head-scratching it came down to directory browsing not being enabled on the parent directory (referenced as "xxxx" in the error above). I'm not entirely sure why this should be the case, but it's a useful thing to remember as generally in a production environment you wouldn't want to have directory browsing enabled.

Temporarily switching directory browsing on allowed me to add the resource.

The same error can also crop when deploying the MSI to another server, the fix though is exactly the same: temporarily enable directory browsing for parent directories. Don't forget to turn it off after the install!

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.