locked
PosExplorer pex = new PosExplorer(); //--> the handle is invalid RRS feed

  • Question

  • Hello All,

    I have an asp.net web based application so i have prepared printout page in it. It is making a call to printer with an activex Object which works to printer by using Pos.Net and OPOS Adk.

    I can easily working on desktop but in my ActiveX object while calling from web giving me error that i think i have inspected the problem (Error Message: The handle is invalid)

    In my code when I say PosExplorer pex = new PosExplorer();  // raising this error

    [ComVisible(true)]
            [SecurityPermission(SecurityAction.Assert)]
            public string PrintReceipt(string lines)
            {
                string track = "-5";
                PosPrinter _printer = null;
                track = "-4";
                const int MAX_LINE_WIDTHS = 2;
                track = "-3";
                string _strFilePath = "D:\\Logo.bmp";
                track = "-2";
                string _bitmapPath = string.Empty;
                string strLogicalName = "PosPrinter";
                
                try
                {
                    //Create PosExplorer
                    PosExplorer posExplorer = new PosExplorer();
                    track = "-1";

    I have tryed all other forums directives interesting with this problem even they are right i have expirenced all of them for example:

    targeted .Net version must be 2.0 (for security), NetFx40_LegacySecurityPolicy true , Registering AX...

    I have to solve this issure and my deadline has been coming our customer insisting us, please if is there someone who experienced my situation help me.

    Best regards


    Hamit YILDIRIM


    Thursday, April 17, 2014 7:29 PM

Answers

  • POS for .NET doesn't work with asp.net applications. Others have tried, but I have not heard any success stories. POS for .NET is limited to local applications Form and WPF since it has to interact with the local hardware.

    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

    Thursday, April 17, 2014 11:48 PM
    Answerer

All replies

  • POS for .NET doesn't work with asp.net applications. Others have tried, but I have not heard any success stories. POS for .NET is limited to local applications Form and WPF since it has to interact with the local hardware.

    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

    Thursday, April 17, 2014 11:48 PM
    Answerer
  • I tryed to use .net framework 2.0 and everything is ok.

    I think last versions of the framework is not trusting this devices

    thank you man


    Hamit YILDIRIM

    Monday, September 21, 2015 2:08 PM