Ensure that HttpConfiguration.EnsureInitialized()

前端 未结 14 1087
一生所求
一生所求 2020-11-30 23:31

I\'ve installed Visual Studio 2013 and when I run my app I get the error below.

I\'ve got no idea as to where I\'m to initialized this object.

What to do?

14条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 23:49

    See @gentiane's answer below for the correct way to handle this now.

    At the end of the Application_Start method in Global.Asax.cs try adding:-

    GlobalConfiguration.Configuration.EnsureInitialized(); 
    

提交回复
热议问题