All Answers

0 votes

Hi Carlos,

For suggestions on how to handle client side access to USB port, please have a look at Digital Signature thread

0 votes

So, for example: if I use “using System.IO.Ports;” am I going to get serial port access but only on the server, right? Does it work for Client side?

0 votes

You can add a scroll margin, see AutoScrollMargin. It adds the specified margin to the scrollable area. It’s identical in WinForms. In general, if the horizontal scrollbar is needed, it will reduce the vertical viewport and may trigger the vertical scrollbar.

  • Luca answered Dec 20, 2017 - 11:22 pm
0 votes

Don’t really know. If the browser supports JavaScript and HTML5 it should work. Wisej is just javascript + html on the client and .NET on the server.

  • Luca answered Dec 20, 2017 - 10:08 pm
0 votes

Wisej has full access to any device on the server and can access anything that is accessible by JavaScript. In general USB ports are not accessible by the browser.

 

  • Luca answered Dec 20, 2017 - 10:07 pm
0 votes

Hi Tung,

I’m glad to see that you are on the right track. You got the general idea. Now you choose the best solution considering your specific scenario.

0 votes

Another approach is to use the Azure Queue for communication between Wisej and the Desktop application. I think should be better than to monitor a local folder.

  • Tung Ngo answered Dec 20, 2017 - 2:58 pm
  • last active Dec 20, 2017 - 2:58 pm
0 votes
Hi Tiago,
Thank you for your recommendation. I though about a “Glue” Desktop Application, but asking if there is another better approach from professional.
I reckon to have a Desktop Application run and minimize to the window task bar. This application will monitor a download folder.
  1. When Wisej need to sign a document, it generate the PDF file, assign the document token to the file attributes, then download to the client computer.
  2. The desktop App see a new PDF file coming in the download folder, it show the user interface for selection the certificate and process the signing.
  3. The desktop App send back the signed PDF to server using the token in the PDF.
Using your approach require user to launch a glue application manually, which is not desirable in my use case.
I don’t know if there is any technology, which allows a wisej application to trigger a desktop application or not.
  • Tung Ngo answered Dec 20, 2017 - 2:52 pm
0 votes

Hi Tung,

This is a bit like accessing scanners on USB port. Web applications just can’t access your USB ports nor can run desktop applications.

The only way I know of solving this problem is to build a glue desktop application: it executes the desktop function you want and uses web services to communicate with server (meaning your Wisej application).

For a sign PDF functionality I would build something like this

  • tell Wisej application (WJSRV ) you want to sign a given document
  • WJSRV will give the user a token, say ABC123
  • user starts the desktop glue application (GLUE)
  • GLUE ask the user about the token
  • GLUE connects to WJSRV web service and uses the token to get the original document to sign
  • GLUE receives the original document
  • GLUE takes all the necessary steps to sign the document
  • GLUE connects to WJSRV web service and sends the signed document along with the token
  • WJSRV receives the signed document and updates the screen so the user can see it’s done

Of course you can design something completely different, where the web services are located on the desktop (client) side and are consumed by the application (server) side.

  • Tiago (ITG) answered Dec 20, 2017 - 1:10 pm
  • last active Dec 20, 2017 - 1:13 pm
0 votes

Hi Tung,

to me it seems that you cannot (or should not) try to access your USB token / certificate from server side code.

You can find a discussion around that topic here:

https://stackoverflow.com/questions/39738912/how-to-sign-pdf-using-usb-token-in-web-application

and a few more pointers here:

https://stackoverflow.com/questions/29210451/itext-generating-pdf-hash-without-certificate-chain

Hope that helps.

Best regards
Frank

0 votes
0 votes

Hi Frank

can you please provide the project sample?

Thanks

Orel

0 votes

Check with F12 in Chrome in case there is a communication or js error. In general it makes no different to Wisej where it’s deployed. It doesn’t even know it since it all goes through an IHttpHandler.

I just published this using the VS publishing tool: http://wisejscrollablepanels.azurewebsites.net/

  • Luca answered Dec 19, 2017 - 5:39 pm
0 votes
In reply to: Office Document Viewer

Here it is: http://s3.amazonaws.com/wisej/downloads/Examples/Wisej.OfficeViewer.zip

It will not work when running it on localhost since office viewers need a publicly accessible url.

  • Luca answered Dec 19, 2017 - 5:29 pm
1 vote
In reply to: multiple project

Hi Frank,

thank you, maybe your answer is the best choice for many people, anyway I have do a solution:

Time ago I have used reflection for load plugin of my software compiled at runtime,

well… suppose to have a subproject named “WebApplication1” that it has a Form, buttons ecc ecc and with my entry point is a class named “myclass” (as program) that open the form:

Public Class myclass
Sub New()
Dim window As New Window1()
window.Show()
End Sub
End Class

Now on the root of “Main project” there are:

bin <— the bin folder

dll <— here I put my sub-projects

Default.html

Default.json

Web.config


in dll I have put my sub project dll, in this test is called WebApplication1.dll (only this dll, not other wisej dlls)

For run at runtime the sub-project I use this code:

Dim asm As System.Reflection.Assembly
asm = System.Reflection.Assembly.Load(IO.File.ReadAllBytes(Application.MapPath("\dll\WebApplication1.dll")))
Dim type As Type = asm.GetType("WebApplication1.miaclasse")
Dim instanceOfMyType As Object = Activator.CreateInstance(type)

and everything works perfectly 🙂

I can change, delete and substitute the dll of subproject without logout the user

Cristian Zerbinati

0 votes
In reply to: Office Document Viewer

Could you provide the code for the example http://demo.wisej.com/officeviewer

I don’ want to provide the URL of my document to the public Viewer.

Thank You

 

  • Tung Ngo answered Dec 18, 2017 - 10:36 pm
  • last active Dec 18, 2017 - 10:41 pm
0 votes
In reply to: multiple project

Hi Cristian,

the only way to avoid the AppPool to recycle is to create a different AppPool for each application.
Otherwise IIS will reload it when it detects any change in /bin.

Best regards,
Frank

0 votes

Sorry, that app was created only to show the UI capabilities for the brochure. That’s why we called it ACME (https://en.wikipedia.org/wiki/Acme_Corporation) 🙂

You can find a starter migration guide here: https://wisej.com/blog/winform-to-wisej-migration-white-paper/

Or you can sign up for a free evaluation of your our WinForms to Web migration here: https://wisej.com/winforms-to-web/

  • Luca answered Dec 18, 2017 - 9:33 pm
1 vote

I solved this myself Via a post on Stack Overflow site: Instead of using the ScrollIntoView method – used the following:

 

ucBatchItem ucItem = new ucBatchItem();
ucItem.Parent = this.flp_Hearings;
this.ActiveControl = ucItem;
this.flp_Hearings.Controls.Add(ucItem);
// this.flp_Hearings.ScrollControlIntoView(ucItem);   ** not used

0 votes

Hi Luca,

No UserComboBox is using, I’ve try the 1.4.53.0 today and it show when I close the a Wisej.Web.Form (call by Show with ShowModalMask = True) by click the “X” icon, but it is not always happen even I try to replicate it by same action, it happen one time till now today

Regards,

  • Ben answered Dec 16, 2017 - 2:48 am
Showing 8041 - 8060 of 11k results