开发者

Hang on Open()/Claim() in OPOS / POS for .NET

开发者 https://www.devze.com 2023-03-31 14:14 出处:网络
I am running Microsoft POS for .NET. I have a cash drawer, barcode scanner and receipt printer connected to the computer. Using the Microsoft POS for .NET test application, they all work fine.

I am running Microsoft POS for .NET. I have a cash drawer, barcode scanner and receipt printer connected to the computer. Using the Microsoft POS for .NET test application, they all work fine.

Our application is an ASP.NET web application, in IIS. We thus instantiate the OPOS devices from the server-side of the web application, and everything works fine. We've been doing this since Windows XP / IIS 5.1.

We're now upgrading our deployment computers to Windows 7. Our development computers run this scenario without issue. However, on the deployment computer I am currently working with, I have had two issues:

Issue 1)

The barcode scanner hangs on the Open() method. It freezes there and never terminates. I discovered that if I changed the permissions (full access to everyone) on the following files, the scanner would start working.

  1. Symbol control object-OCX c:\WINDOWS\system32\scanner.ocx
  2. Service Object-DLL c:\WINDOWS\system32\stiopos.dll

Issue 2)

The cash drawer is now presenting similar behaviour: it freezes on the Claim() method. I have changed permissions on all the files I could find (even loading up sysinternal's Process Explorer) to find which files were in use. This has not solved the problem.

Notes:

  1. IIS is now running as SYSTEM in my tests - it makes no difference.
  2. The hardware works fine in Epson OPOS and the Microsoft POS for .NET test tool. Therefore, the issue is only when running within the context of a web application.
  3. The application uses c:\program files\OPOS\CommonCO\OPOSCashDrawer.ocx and c:\program files\开发者_JS百科OPOS\Epson2\SoDrw14.dll

Have you ever seen this behaviour? Do you have any suggestions on how to solve it?

Stack trace when hangs:

Microsoft.PointOfService.dll!Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethod(string methodName = "ClaimDevice", ref object[] parameters, bool[] byRef) + 0x94 bytes    
Microsoft.PointOfService.dll!Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethodAndCheckImpl(string methodName = "ClaimDevice", ref object[] parameters, bool[] byRef) + 0x50 bytes    
Microsoft.PointOfService.dll!Microsoft.PointOfService.Legacy.LegacyProxy.Claim(int timeout) + 0x54 bytes    
Microsoft.PointOfService.dll!Microsoft.PointOfService.Legacy.LegacyCashDrawer.Claim(int timeout) + 0xd bytes    


Solution: Switch the app pool to Classic mode (instead of Integrated). It works like a charm now!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号