Click here to Skip to main content
15,884,898 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
In my VB.Net project the ActiveX objects are created in .js as shown below and it works well on IE but not on Edge Chromium and Chrome browser.

function createActiveXObj(){
    if(!fs) fs = new ActiveXObject("Scripting.FileSystemObject");
    if(!app) app = new ActiveXObject("AcroExch.App");
    if(!doc) doc = new ActiveXObject("AcroExch.PDDoc");
}

The "fs" object is used to Check if the folder exists, if not create one on the server. If folder exists then open a PDF in the folder through object "doc" and get a jso object from the file and added an uncontrolled copy then save a file and close. Finally move the the file from one folder destination to another all in .js .

All ActiveX objects fs, app and doc are undefined in Edge and Chrome. 

So need alternative approach to implement the same functionality that works on Edge and chrome also IE.


What I have tried:

I tried to enable the IE Compatible mode in Edge Chromium but due to some security constraints I cannot go with that approach, so need a permanent solution with code changes.
Posted
Updated 31-May-21 5:40am
v3
Comments
Richard MacCutchan 31-May-21 9:03am    
ActiveX is largely unsupported owing to security considerations.

ActiveX isn't supported in any modern browsers today because they are considered security risks.
 
Share this answer
 
Comments
Member 15224382 31-May-21 11:42am    
Could you please suggest an alternative approach to implement same functionality that works on Edge and Chrome.
Dave Kreskowiak 31-May-21 11:47am    
You don't. FileSystemObject would have given you access to the clients file system, which you cannot do at all any more in a browser. Again, security concerns.
Quote:
Activex control is not working on edge and chrome browser created in VB.NET project

Activex have never work on browsers other than EI and will never.
You can consider Activex as a dead technology.
As MS start to uninstall EI in latest windows updates, you should consider other solutions.
 
Share this answer
 
Comments
Member 15224382 31-May-21 11:42am    
Could you please suggest an alternative approach to implement same functionality that works on Edge and Chrome.
Richard Deeming 1-Jun-21 11:13am    
EI?
EI?!
Oh.

😋
Patrice T 1-Jun-21 13:35pm    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900