0

i'm using vs2012 and created a MVC4 project

i'm going to implement a webhook for telegram bot.

but after i added Telegram Bot Api from nuget, my projects not compiles fully and throws an exception like below:

Attempt by method 'System.Web.Http.HttpConfiguration..ctor(System.Web.Http.HttpRouteCollection)' to access method 'System.Web.Http.HttpConfiguration.DefaultFormatters()' failed.

i found some solutions on stackoverflow but they couldn't helped me. some one siad uninstall and install WebApiClient but it had no affects.

Sajjad.HS
  • 381
  • 2
  • 8
  • 19

1 Answers1

1

i just commented this code in Global.asax.cs and it's working truly...

WebApiConfig.Register(GlobalConfiguration.Configuration);
Sajjad.HS
  • 381
  • 2
  • 8
  • 19