OpenPrinter从Web Service失败,但在同一应用程序中从Web页面工作。 [英] OpenPrinter fails from Web Service, but works from Web Page in same application.

查看:106
本文介绍了OpenPrinter从Web Service失败,但在同一应用程序中从Web页面工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在使用一些代码将原始文本命令发送到Zebra打印机。 我从这里使用rawprinterhelper代码:
http://support.microsoft.com/kb/322090   ;我有一个网页,我可以在这里调用代码,它工作得很好。 在这种情况下,将lavbel发送到Zebra打印机。 但是,当我在同一个应用程序中从Web服务调用相同的
代码时,'Openprinter命令失败并显示1801。 我已经确认通过了完全相同的数据。 可能有什么区别?  Web服务(.asmx)和网页(.aspx)是否在
不同的上下文下运行?


问候,


-Jay


 

解决方案

错误1801可能是打印机名称错误(http://help.netop.com/support/errorcodes/win32_error_codes.htm )。但是,由于这与ASP.NET有关,您可以在 forums.asp.net 上获得更明智的答案


如果您的Web服务依赖于会话状态,您是否修饰了方法声明,如
在Web服务中使用ASP.NET会话状态


-

Andrew


Hello,

I'm working with some code to sent raw text commands to a Zebra Printer.  I use the rawprinterhelper code from here: http://support.microsoft.com/kb/322090  I have a web page from where I call the code and it works just fine.  In this case, sending a lavbel to a Zebra printer.  However, when I call the same code from a Web Service in the very same application, the 'Openprinter command fails with 1801.  I have verfied that the exact same data is being passed.  What could be the difference?  Do web services (.asmx) and web pages (.aspx) run under different contexts?

Regards,

-Jay

 

解决方案

Error 1801 could be a printer name error (http://help.netop.com/support/errorcodes/win32_error_codes.htm). But as this is to do with ASP.NET, you might get a more informed answer at forums.asp.net.

If your web service depends on session state, have you decorated the method declaration as shown in Using ASP.NET Session State in a Web Service?

--
Andrew


这篇关于OpenPrinter从Web Service失败,但在同一应用程序中从Web页面工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆