使用ASP .Net MVC 5,IIS 8.0.0.9,eBaySdk
当我尝试通过SDK调用获取令牌时,会发生此错误。托管后当然。但在视觉工作室,它工作正常。我认为,我必须设置一定级别的权限,以允许用户使用sdk或类似的东西。这是完整的错误跟踪。
访问被拒绝
说明:
执行当前期间发生了未处理的异常 网络请求。请查看堆栈跟踪以获取更多信息 错误以及它在代码中的起源。
例外详细信息:
System.ComponentModel.Win32Exception:拒绝访问
来源错误:
执行期间生成了未处理的异常 当前的网络请求。 可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。
堆栈追踪:
[Win32Exception(0x80004005):访问被拒绝] System.Diagnostics.Process.StartWithShellExecuteEx(的ProcessStartInfo startInfo)+773 System.Diagnostics.Process.Start()+ 123 System.Diagnostics.Process.Start(ProcessStartInfo startInfo)+49 System.Diagnostics.Process.Start(String fileName)+31 eBay.Service.Util.SdkUtility.LaunchSignInPage(ApiContext Context,String SessionID)+671 VialinkerApps.App_Start.eBayApi.GetToken(UrlHelper url)+523 VialinkerApps.Controllers.SettingsController.AcceBay(eBaySetting 易趣设置)+16 lambda_method(Closure,ControllerBase,Object [])+104 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller,Object []参数)+14 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary2参数)+156 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext,ActionDescriptor actionDescriptor,IDictionary2 参数)+27 System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult的 asyncResult,ActionInvocation innerInvokeState)+22 System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult的 asyncResult)+29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End()+49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult的 asyncResult)+32 System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +50 System.Web.Mvc.Async<> c__DisplayClass46.b__3f() +225 System.Web.Mvc.Async<> c__DisplayClass46.b__3f() +225 System.Web.Mvc.Async。<> c__DisplayClass33.b__32(IAsyncResult asyncResult)+10 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult的 asyncResult)+10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End()+49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult的 asyncResult)+34 System.Web.Mvc.Async<> c__DisplayClass2b.b__1c() +26 System.Web.Mvc.Async<> c__DisplayClass21.b__1e(IAsyncResult的 asyncResult)+100 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult的 asyncResult)+10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End()+49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult的 asyncResult)+27 System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult,ExecuteCoreState innerState)+13 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult的 asyncResult)+36 System.Web.Mvc.Async.WrappedAsyncResultBase1.End()+54 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+39 System.Web.Mvc.Controller.b__15(IAsyncResult asyncResult,Controller controller)+12 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult的 asyncResult)+28 System.Web.Mvc.Async.WrappedAsyncResultBase1.End()+54 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)+29 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult的 asyncResult)+10 System.Web.Mvc.MvcHandler.b__5(IAsyncResult的 asyncResult,ProcessRequestState innerState)+21 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult的 asyncResult)+36 System.Web.Mvc.Async.WrappedAsyncResultBase1.End()+54 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)+31
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult
结果)+9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 9651796 System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously)+155
答案 0 :(得分:0)
您的用户无权访问Win32Exception。
您可以将管理员用户设置为完全权限,也可以向该用户添加权限。
在IIS中,Manage->Pool Application->Advance Setting->Identity
更改为Custom Account
,并为Administrator
用户设置密码