A
A
Akimov Alexander2016-05-11 09:51:34
ASP.NET
Akimov Alexander, 2016-05-11 09:51:34

For what reason, the equipment through dll works in WinForm, but not in ASP.NET?

Good afternoon.
There is a local web application project that uses a scanner. When trying to connect to the hardware, the dll gives a connection error. Those. the library is connected correctly. Similar code works correctly in WinForm.
There are suspicions that the matter is in the IIS server settings. I listened to the usb port, when connected through the correct application and if the connection is successful, it can be seen that no data is being sent or received, the status is successful.
Here is the code itself. Same as in WinForms and in ASP.NET

[DllImport("ScanDll.dll")]
        public static extern int IO_HasScanner(string DeviceName, IntPtr Handle);

         IntPtr ptr = Marshal.AllocHGlobal(4);
         API_IDCV.iRet = IO_HasScanner("IDC_V", ptr);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Akimov Alexander, 2016-05-11
@Akim53

The pool setting helped: Start Mode:AlwaysRunning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question