The ‘name’ configuration element key cannot be null

When you create a simple .Net 4 WCF Service Application it generates a simplified web.config file with default endpoints. This is great when you need a simple service and don’t want a cluttered config file. However, I did come across a small issue with the default file when you try to open it with the Service Configuration Editor. When you try to open the file an error is displayed; ‘The ‘name’ configuration element key cannot be null’. To fix the problem just add the name attribute to the behavior node;

        <behavior name="defaultBehaviour">
            <serviceMetadata httpGetEnabled="true" />

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s