эта проблема произошла со мной. i не знаю, почему, но просто успокойтесь, просто измените свое действие. Имя объекта (UserCreate User) каким-то другим, как (UserCreate User_create)
MSDN: Configuration Manager.AppSettings
if (ConfigurationManager.AppSettings[name] != null)
{
// Now do your magic..
}
или
string s = ConfigurationManager.AppSettings["myKey"];
if (!String.IsNullOrEmpty(s))
{
// Key exists
}
else
{
// Key doesn't exist
}
Используя новый c# синтаксис с TryParse, работавшим хорошо для меня:
// TimeOut
if (int.TryParse(ConfigurationManager.AppSettings["timeOut"], out int timeOut))
{
this.timeOut = timeOut;
}