How to launch web browser from client side

29 Views Asked by At

I have a project with model client-server by visual basic language code windows form. I create my server include all project code at iis server. From client computer (without include project code only UI) run program and i want to open web browser and access to any link. I have used process.start("url") and it run ok in local computer. But When i build code to .dll file and update to iis server it not run from client side.

Public Shared Sub TestOpenWeb(ByVal sender As WXSource, ByVal e As WXArgs)
        Process.Start("iexplore.exe", "https://www.google.com/")
    End Sub
1

There are 1 best solutions below

0
David On

When i build code to .dll file and update to iis server it not run from client side.

And further clarified in a comment on the question above...

This code is executed at the iis server

Code that's executed on the server executes on the server, not on the client. So currently you're opening a web browser on the server.

In the question you also mention...

I have a project with model client-server by visual basic language code windows form.

If the client in this case is a Windows Forms application then it sounds like that's where you want to execute this code.

If you want to open a web browser on the client then you should be executing this Process.Start() operation in your client application, not the server application.