AliGrant.com
 
Valid XHTML 1.0!

Valid CSS!

Powered by PHP

Get FireFox

1&1 Internet


Archived News

btstask.exe - Unexpected directory entry of type IIsObjectFriday 4th 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!


EntityFramework - The column name is not valid.Thursday 3rd December 2015
"The column name is not valid. [ Node name (if any) = Extent1,Column name = Discriminator ]"

This appeared, seemingly randomly the other day. Entity Framework 6 running against SQL Server Compact Edition.

I rolled back my database and model code to try and clear the error but it persisted. The give away to fix this is the column name, "Discriminator" - this is a special (by convention) column used by EF to allow you to use inheritance with your POCO classes. If you wanted to use one database table to back a base class and it's children then a discriminator is used for EF to identify which class a data row corresponds to.

The confusing thing for me here was that this is existing code that has been working for a long time and I wasn't referencing any child classes. As it turned out, whilst I wasn't referencing any child classes, I had defined some elsewhere for a future idea I was working on. And even though this class wasn't being used, it was enough to cause the Entity Framework to have a wobbly.

Removing the class immediately fixed the problem.


Previous Next