[英]An exception of type 'System.ArgumentNullException' occurred in mscorlib.dll but was not handled in user code
When I am trying to run my application I am getting this exception 当我尝试运行我的应用程序时,出现此异常
An exception of type 'System.ArgumentNullException' occurred in mscorlib.dll but was not handled in user code
In Global.asaxcs
file in GlobalConfiguration.Configure(WebApiConfig.Register);
在
GlobalConfiguration.Configure(WebApiConfig.Register);
Global.asaxcs
文件中GlobalConfiguration.Configure(WebApiConfig.Register);
line 线
Here is the code 这是代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Routing;
namespace Bot_Application2_test
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
}
}
}
How to solve this? 如何解决呢?
I faced the same problem. 我遇到了同样的问题。 In Solution Explorer -> Web.config .
在解决方案资源管理器-> Web.config中。 Make sure AppID & AppSecret is not null.
确保AppID&AppSecret不为null。 {
{
<appSettings>
<!-- update these with your appid and one of your appsecret keys-->
<add key="AppId" value="YourAppId" />
<add key="AppSecret" value="YourAppSecret" />
</appSettings>
} }
Hope it helps you! 希望对您有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.