各位大佬,本人在使用webapi的时候,发现一个问题。程序引用了第三方类库,运行时候报错。类库都有上传到项目中。求解答,万分感谢。
Request Exception Happened-------------------------------
Path/customapi/zkapi/testpostapi
{
"ClassName": "System.ArgumentException",
"Message": "The specified invariant name 'System.Data.SqlClient' wasn't found in the list of registered .NET Data Providers.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName, Boolean throwOnError)
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at FaceApi.SqlServerProvider.CreateDbProviderFactory()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location where exception was thrown ---
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at FaceApi.SqlServerProvider.CreateConnection()
at FaceApi.DbContext.get_CreateCommand()
at FaceApi.DbContext.Sql(String sql, Object[] parameters)
at FaceApi.iZkFace.FnGetMacInfo()
at FaceApi.iZkFace.GetUserListFromMac(Int32 macid)
at FaceApi.zkapi.TestPostAPI()
at Forguncy.KatanaMiddleware.j.a(HttpContext A_0)
at Forguncy.KatanaMiddleware.j.InvokeAsync(HttpContext context)
at Forguncy.KatanaMiddleware.i.InvokeAsync(HttpContext context)
at Forguncy.Server2.KatanaMiddleware.StartPageMiddleware.InvokeAsync(HttpContext context)
at ForguncyServerCommon.HttpHeaderMiddlewareBase.InvokeAsync(HttpContext context)
at Forguncy.KatanaMiddleware.p.InvokeAsync(HttpContext context)",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147024809,
"Source": "System.Data.Common",
"WatsonBuckets": null,
"ParamName": null
}
|