“/”应用程序中的服务器错误。

未将对象引用设置到对象的实例。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。

源错误:


行 41:             nonceStr = JSSDKHelper.GetNoncestr();
行 42:             JSSDKHelper jssdkhelper = new JSSDKHelper();
行 43:             string ticket = JsApiTicketContainer.TryGetTicket(appID, appSecret);
行 44:             signature = jssdkhelper.GetSignature(ticket, nonceStr, timestamp, HttpContext.Current.Request.Url.AbsoluteUri.ToString());
行 45:             

源文件: D:\CCDIH3.0base\DTcms.Web.UI\Page\article_show.cs    行: 43

堆栈跟踪:


[NullReferenceException: 未将对象引用设置到对象的实例。]
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +200
   Senparc.Weixin.MP.CommonAPIs.JsApiTicketContainer.Register(String appId, String appSecret) +322
   Senparc.Weixin.MP.CommonAPIs.JsApiTicketContainer.TryGetTicket(String appId, String appSecret, Boolean getNewTicket) +139
   DTcms.Web.UI.Page.article_show.ShowPage() in D:\CCDIH3.0base\DTcms.Web.UI\Page\article_show.cs:43
   DTcms.Web.UI.BasePage..ctor() in D:\CCDIH3.0base\DTcms.Web.UI\BasePage.cs:35
   DTcms.Web.UI.Page.article_show..ctor() in D:\CCDIH3.0base\DTcms.Web.UI\Page\article_show.cs:24
   ASP.aspx_main_news_show_aspx..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\58f67f09\375c7217\App_Web_e1hngbvm.11.cs:0
   __ASP.FastObjectFactory_app_web_e1hngbvm.Create_ASP_aspx_main_news_show_aspx() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\58f67f09\375c7217\App_Web_e1hngbvm.36.cs:0
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +173
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +41
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +489
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +370


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.1