7
votes

.Net 4.5 , MVC 5 , IIS 8

SdkUtility.LaunchSignInPage(apiContext, _sessionID);

From my application (in VS 2013) I can easily access to the sign in page. But problem occurs when I published it in IIS. firstly it shows error like access denied.

I have searched and in IIS, ApplicationIdentity pool, I gave NETWORK_SERVICE and gave Network Service full authentication to read or read & execute...

Error does not show up any more. but the sign in page does not appear.

**EDIT 1: **

Using ASP .Net MVC 5, IIS 8.0.0.9, eBaySdk

While I try to get token via SDK call, this error occurs. Of course after hosting. but in visual studio, it works fine. What I think is, I have to set certain level of permission to allow users to use sdk or something like that. Here is the full error trace.

Access is denied

Description:

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.

Exception Details:

System.ComponentModel.Win32Exception: Access is denied

Source Error:

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.

Stack Trace:

[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

    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult

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

1
Can you give us some background information? What does appear? Resulting DOM code? Any exceptions?D.R.
@abdur Rahim Can you provide morecode?and error screen shottsJagadeesh Govindaraj
@D.R. Here are the exception trace from IISAbdur Rahim
@JagadeeshGovindaraj Here are the exception trace from IISAbdur Rahim
What operating system are you running your IIS on?D.R.

1 Answers

0
votes

From what I can understand by reading the Stack Trace you can see it's trying to do a System.Diagnostics.Process.Start. This sounds pretty wierd to me trying to "redirect" on a webserver (IIS).

And should give you errors as your literally trying to start an executable in you IIS process.

This behaviour seems more likely if you run it in a Desktop application, to "start" your default browser with an URL.

Would also explain why it seems to be working locally in Visual Studio.

I'd check any documentation if it's suposed to be used from an IIS/ASP.NET application.