C# 用户代码未处理EntryPointNotFoundException
我正在编写其他开发人员的代码 在获取数据时,我调用了一个方法,得到了这个异常C# 用户代码未处理EntryPointNotFoundException,c#,model-view-controller,C#,Model View Controller,我正在编写其他开发人员的代码 在获取数据时,我调用了一个方法,得到了这个异常 An exception of type 'System.EntryPointNotFoundException' occurred in NDIP.Applications.ManagementConsole.UI.dll but was not handled in user code Additional information: Entry point was not found. 堆栈跟踪 at NDI
An exception of type 'System.EntryPointNotFoundException' occurred in NDIP.Applications.ManagementConsole.UI.dll but was not handled in user code
Additional information: Entry point was not found.
堆栈跟踪
at NDIP.Contracts.CMSInventoryMgmtService.IJITInventoryMgmt.GetScanCodeReportDetails()
at NDIP.Applications.ManagementConsole.SiteManager.GetScancodeList() in f:\PROJECTS\ADP\RO\RST Order\Source\KRTService\AngularPrototype\JIT\Applications\WebManagement\ManagementConsole.UI\Components\SiteManager.cs:line 16
at NDIP.Applications.ManagementConsole.UI.Controllers.ManagementServiceController.GetItemAliases() in f:\PROJECTS\ADP\RO\RST Order\Source\KRTService\AngularPrototype\JIT\Applications\WebManagement\ManagementConsole.UI\Controllers\ManagementServiceController.cs:line 71
at NDIP.Applications.ManagementConsole.UI.Controllers.ManageSiteController.Index() in f:\PROJECTS\ADP\RO\RST Order\Source\KRTService\AngularPrototype\JIT\Applications\WebManagement\ManagementConsole.UI\Controllers\ManageSiteController.cs:line 27
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
代码
该方法是否使用任何本机DLL?您在浏览器url中调用了控制器方法并导致此错误?非.NET代码-本机代码。C代码是否在任何地方使用DllImport?如果不是,那不是问题…@JonSkeet:是的,它似乎使用了NDIP.Services.InventoryService dllI我不知道你之前为什么说有这样一个DLL。哦,好吧。。。
public static List<ItemScancodes> GetScancodeList()
{
IJITInventoryMgmt service = new InventoryService();
ItemScancode[] itemaliases = service.GetScanCodeReportDetails(); // Error comes at this line
//populate ItemScancodes
List<ItemScancodes> list = new List<ItemScancodes>();
foreach (ItemScancode info in itemaliases)
{
ItemScancodes scan = new ItemScancodes();
scan.ItemIID = info.ItemIID;
scan.ItemId = info.ItemId;
scan.ItemClass = info.ItemClass;
scan.ShipVendor = info.ShipVendor;
scan.PackageQty = info.PackageQty;
scan.UnitOfIssueCost = info.UnitOfIssueCost;
scan.ItemGenericName = info.ItemGenericName;
scan.ItemAliasItemIID = info.ScanCode.ItemIID;
scan.ItemAliasIID = info.ScanCode.ItemAliasIID;
scan.ItemAlias = info.ScanCode.ItemAlias;
scan.NDC = info.ScanCode.NDC;
list.Add(scan);
}
return list;
}