c# – SdkUtility.LaunchSignInPage没有重定向到ebay登录页面

前端之家收集整理的这篇文章主要介绍了c# – SdkUtility.LaunchSignInPage没有重定向到ebay登录页面前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
.Net 4.5,MVC 5,IIS 8
SdkUtility.LaunchSignInPage(apiContext,_sessionID);

从我的应用程序(在VS 2013中),我可以轻松访问登录页面.但是当我在IIS中发布它时会出现问题.首先它显示拒绝访问的错误.

我在IIS,ApplicationIdentity池中搜索过,我给了NETWORK_SERVICE并给了网络服务完整的身份验证来读取或读取&执行…

错误不再显示.但是没有出现登录页面.

**编辑1:**

使用ASP .Net MVC 5,IIS 8.0.0.9,eBaySdk

当我尝试通过SDK调用获取令牌时,会发生此错误.托管后当然.但在视觉工作室,它工作正常.我认为,我必须设置一定级别的权限,以允许用户使用sdk或类似的东西.这是完整的错误跟踪.

访问被拒绝

描述:

An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about
the error and where it originated in the code.

例外细节:

System.ComponentModel.Win32Exception: Access is denied

来源错误

An unhandled exception was generated during the execution of the
current web request.
Information regarding the origin and location of the exception can be identified using the exception stack trace below.

堆栈跟踪:

[Win32Exception (0x80004005): Access is denied]
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
eBaySetting) +16
lambda_method(Closure,ControllerBase,Object[] ) +104
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller,Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext
controllerContext,IDictionary2 parameters) +156
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
controllerContext,ActionDescriptor actionDescriptor,IDictionary2
parameters) +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

06001

result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+9651796
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) +155

解决方法

通过阅读Stack Trace,我可以看到它正在尝试执行System.Diagnostics.Process.Start.对于我试图在网络服务器(IIS)上“重定向”这听起来非常奇怪.

并且应该在您尝试在IIS进程中启动可执行文件时给出错误.

如果您在桌面应用程序中运行它,使用URL“启动”默认浏览器,则此行为似乎更有可能.

还可以解释为什么它似乎在Visual Studio中本地工作.

如果它是从IIS / ASP.NET应用程序中使用的话,我会检查任何文档.

原文链接:https://www.f2er.com/csharp/99779.html

猜你在找的C#相关文章