What are appSettings keys valid characters?

This is strange. I thought I would easily find this information googling, but I haven't had much success. All I want to know is what are the valid characters that can be used for the keys in the AppSettings section of a Web.config file. Eg:

<add key="MySpeed" value="100" />
<add key="My.Speed" value="100" />
<add key="My Speed" value="100" />
<add key="Vélocité" value="100" />

Would all of the above keys be permitted?

Upvotes: 7

Views: 2807

Answers (1)

Rob Johnston
Rob Johnston

Reputation: 879

The Microsoft documentation states only that the key is a String attribute. Nothing more. Their examples do show a key with spaces in the name.

Upvotes: 5

Related Questions