none
Receipt printer PosControlException under different user

    Question

  • Hi all,

    For security reasons we recently changed my application from running under a limited local user to an equally limited Active Directory user.

    Using this new user, the (Zebra/Swecoin TTP 2030) receipt printer has taken to throwing vague (error code-less) exceptions on it's Open method which don't give enough detail for me to diagnose the problem.

    At the moment I assume this is a permissions issue with something (most likely) but I haven't even got a place to start looking from my logs.

    is there a solution? is it permissions? does somebody know the permissions needed and/or to what? are there any debugging tricks when your in this scenario? 

    Many thanks! =]

    Event log from my Active Directory user

    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Leaving GenerateLegacyProxy().
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Leaving CreateInstance()
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Entering EmitProxy().
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Generating dynamic assembly OPOS.POSPrinter.ccb90153-b81e-11d2-ab74-0040054c3719
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Using type library: C:\Windows\system32\OPOSPOSPrinter.ocx for OPOS.POSPrinter
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Returning DispId: 3 for ErrorEvent
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Returning DispId: -1 for DataEvent
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Returning DispId: 5 for StatusUpdateEvent
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Returning DispId: 2 for DirectIOEvent
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Returning DispId: 4 for OutputCompleteEvent
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Generating LegacyEvents interface.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding custom attributes.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding ErrorEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding DataEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding StatusUpdateEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding DirectIOEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding OutputCompleteEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Generating LegacyEventsClass.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding ErrorEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding DataEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding StatusUpdateEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding DirectIOEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Adding OutputCompleteEvent.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Creating the type.
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Finished generating proxy type for OPOS.POSPrinter
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Instantiating and returning event proxy for OPOS.POSPrinter
    [5/24/2012 1:09:13 PM	   14	INFO   	Explorer]	Leaving EmitProxy.
    [5/24/2012 1:09:13 PM	   14	INFO   	LegacyProxy]	Entering InvokeMethod() for Open
    [5/24/2012 1:09:13 PM	   14	ERROR  	PosException]	Microsoft.PointOfService.PosControlException: Method Open threw an exception.  The service object returned a failure status from its open call, but does not have a more specific failure code.
    ErrorCode: Failure
    ErrorCodeExtended: 0
    Stack trace:    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Microsoft.PointOfService.PosException.GetExceptionText(Exception e)
       at Microsoft.PointOfService.PosException.LogError()
       at Microsoft.PointOfService.PosControlException..ctor(String message, ErrorCode errorCode, Int32 errorCodeExtended)
       at Microsoft.PointOfService.Legacy.LegacyProxy.ThrowLegacyMethodException(String methodName, Int32 ResultCode, Exception e)
       at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethod(String methodName, Object[]& parameters, Boolean[] byRef)
       at Microsoft.PointOfService.Legacy.LegacyProxy.Open()
       at Microsoft.PointOfService.Legacy.LegacyPosPrinter.Open()
       at BritishLibrary.Kiosk.Services.ReceiptPrinterService.<getPrinter>b__5() in C:\Documents and Settings\johnu\My Documents\Visual Studio 2010\Projects\Nouveau SVN\BritishLibrary.Kiosk\BritishLibrary.Kiosk.Services\ReceiptPrinterService.cs:line 328
       at System.Threading.Tasks.Task`1.InvokeFuture(Object futureAsObj)
       at System.Threading.Tasks.Task.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()

    and the same (only working) from my local user

    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Leaving GenerateLegacyProxy().
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Leaving CreateInstance()
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Entering EmitProxy().
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Generating dynamic assembly OPOS.POSPrinter.ccb90153-b81e-11d2-ab74-0040054c3719
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Using type library: C:\Windows\system32\OPOSPOSPrinter.ocx for OPOS.POSPrinter
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Returning DispId: 3 for ErrorEvent
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Returning DispId: -1 for DataEvent
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Returning DispId: 5 for StatusUpdateEvent
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Returning DispId: 2 for DirectIOEvent
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Returning DispId: 4 for OutputCompleteEvent
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Generating LegacyEvents interface.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding custom attributes.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding ErrorEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding DataEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding StatusUpdateEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding DirectIOEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding OutputCompleteEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Generating LegacyEventsClass.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding ErrorEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding DataEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding StatusUpdateEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding DirectIOEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Adding OutputCompleteEvent.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Creating the type.
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Finished generating proxy type for OPOS.POSPrinter
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Instantiating and returning event proxy for OPOS.POSPrinter
    [5/24/2012 12:50:35 PM	    7	INFO   	Explorer]	Leaving EmitProxy.
    [5/24/2012 12:50:35 PM	    7	INFO   	LegacyProxy]	Entering InvokeMethod() for Open
    [5/24/2012 12:50:36 PM	    7	INFO   	LegacyProxy]	Leaving InvokeMethod() for Open
    [5/24/2012 12:50:36 PM	    7	INFO   	LegacyProxy]	Entering InvokeMethodAndCheck() for ClaimDevice
    [5/24/2012 12:50:36 PM	    7	INFO   	LegacyProxy]	Entering InvokeMethod() for ClaimDevice
    [5/24/2012 12:50:36 PM	    7	INFO   	LegacyProxy]	Leaving InvokeMethod() for ClaimDevice
    [5/24/2012 12:50:36 PM	    7	INFO   	LegacyProxy]	InvokeMethod() returned Success
    [5/24/2012 12:50:36 PM	    7	INFO   	LegacyProxy]	Leaving InvokeMethodAndCheck() for ClaimDevice
    [5/24/2012 12:50:54 PM	    4	INFO   	LegacyProxy]	Entering InvokeMethodAndCheck() for DirectIO
    [5/24/2012 12:50:54 PM	    4	INFO   	LegacyProxy]	Entering InvokeMethod() for DirectIO


    Thursday, May 24, 2012 1:17 PM

All replies

  • Issue now resolved through trial and error with our technical team, didn't manage to identify the specific issue.
    Friday, May 25, 2012 10:36 AM