Working around the security of Internet Explorer
- AlexLachance
- Posts: 2196
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2382
- x 2025
Working around the security of Internet Explorer
We'd like to create something that could be ran from the ERP, that would open SolidWorks, read an excel file for a listing, and then generate whatever is required by the listing.
The issue we're facing is that our E.R.P. is built on Internet Explorer (Eww, right?) and because of that, there is a "limitation" if I could say, by the security of Internet Explorer, and because of that, our E.R.P. cannot communicate directly with SolidWorks.
If we were to be able to have our E.R.P. communicate directly with SolidWorks, we could then have our E.R.P. have it's own SolidWorks licence so that it could then create the STEPs, PDFs, and DXFs the ERP says it requires.
Any idea how we could proceed with this? Our programmer says he believes it would be well over 120 hours of programming to work around that security limitation.
The issue we're facing is that our E.R.P. is built on Internet Explorer (Eww, right?) and because of that, there is a "limitation" if I could say, by the security of Internet Explorer, and because of that, our E.R.P. cannot communicate directly with SolidWorks.
If we were to be able to have our E.R.P. communicate directly with SolidWorks, we could then have our E.R.P. have it's own SolidWorks licence so that it could then create the STEPs, PDFs, and DXFs the ERP says it requires.
Any idea how we could proceed with this? Our programmer says he believes it would be well over 120 hours of programming to work around that security limitation.
Re: Working around the security of Internet Explorer
Do you access the ERP via the browser or is it a standalone app that uses an embedded Internet Explorer browser control?
- AlexLachance
- Posts: 2196
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2382
- x 2025
Re: Working around the security of Internet Explorer
We access the ERP via the browser. They have started working on converting it so that it can be fully operating on Google Chrome, but it is not the case yet.
Re: Working around the security of Internet Explorer
SOLIDWORKS makes itself available as a COM object. Internet Explorer can create and communicate with COM objects via Javascript like this:
If I load a web page with the above, I get a warning like this:
If I allow blocked content, I get another warning:
If I click 'Yes', SOLIDWORKS starts (in the background) and displays the message as intended:
I need to install IIS to see what happens when the HTML file is served from a web server as opposed to loading a local file. I'll report back.
If I load a web page with the above, I get a warning like this:
If I allow blocked content, I get another warning:
If I click 'Yes', SOLIDWORKS starts (in the background) and displays the message as intended:
I need to install IIS to see what happens when the HTML file is served from a web server as opposed to loading a local file. I'll report back.
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: Working around the security of Internet Explorer
I'm not a programmer, but when I saw his post, I thought could this be done with Javascript? And viola, maybe it can be done.JSculley wrote: ↑Tue Nov 02, 2021 9:02 am SOLIDWORKS makes itself available as a COM object. Internet Explorer can create and communicate with COM objects via Javascript like this:
image.png
If I load a web page with the above, I get a warning like this:
image.png
If I allow blocked content, I get another warning:
image.png
If I click 'Yes', SOLIDWORKS starts (in the background) and displays the message as intended:
image.png
I need to install IIS to see what happens when the HTML file is served from a web server as opposed to loading a local file. I'll report back.
If it's working only in IE, there's probably some out dated code in there requiring IE. We had a similar thing with our SAP implementation, but to my knowledge they figured it out and fixed it.
Re: Working around the security of Internet Explorer
It works over the local intranet as well. I enabled the web server on one of our test servers, put a file with the same Javascript I posted previously, and when browsing to the server I get this message:I need to install IIS to see what happens when the HTML file is served from a web server as opposed to loading a local file. I'll report back.
Clicking 'Allow' leads to this message:
Clicking 'Yes' starts SW and shows the message:
I don't have an external web server to test with, but I would think that it would work the same way. The bottom line is that out of the box, IE isn't prevented from interacting with SW.
- AlexLachance
- Posts: 2196
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2382
- x 2025
Re: Working around the security of Internet Explorer
Thanks Jim, it's exactly what I figured but one of my colleagues was arguing with me that it couldn't be done and since my background in programmation is very basic I was holding back on refutting him.
- jcapriotti
- Posts: 1870
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1215
- x 1999
Re: Working around the security of Internet Explorer
Where do you store your SolidWorks files? In the ERP or PDM or network folder?
Jason
- AlexLachance
- Posts: 2196
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2382
- x 2025
Re: Working around the security of Internet Explorer
Network folder.jcapriotti wrote: ↑Tue Nov 02, 2021 2:12 pm Where do you store your SolidWorks files? In the ERP or PDM or network folder?
If we were to speak for the sake of speaking, would there be an alternative that both works for Internet Explorer and Google Chrome, as a COM object would allow us to use this until our ERP transitions to Chrome, which is rather soon, so I'd like to perhaps find another alternative that would work for both browsers.
For reference, as far as I'm aware, the ERP is supposed to eventually work for Chrome, Safari, Edge.
Re: Working around the security of Internet Explorer
There is an add-on for Chrome called IE Tab that essentially embeds the IE rendering engine in a Chrome tab. My example works with that as well.AlexLachance wrote: ↑Tue Nov 02, 2021 2:29 pm Network folder.
If we were to speak for the sake of speaking, would there be an alternative that both works for Internet Explorer and Google Chrome, as a COM object would allow us to use this until our ERP transitions to Chrome, which is rather soon, so I'd like to perhaps find another alternative that would work for both browsers.
For reference, as far as I'm aware, the ERP is supposed to eventually work for Chrome, Safari, Edge.
- jcapriotti
- Posts: 1870
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1215
- x 1999
Re: Working around the security of Internet Explorer
Trying to get a browser to do this sounds very fragile, one update and its broken.
I would have a server with SolidWorks on it along with a custom program that "watches" for files in a processing folder. Have your ERP automatically export a file with the drawing number and revision to the "watch" folder on that server, either via a button press or workflow trigger. The watch program "sees" that file, launches SolidWorks, generates the dxf, etc, then deletes the file. Then another program uses your ERP's API to upload the contents back into the ERP.
I would have a server with SolidWorks on it along with a custom program that "watches" for files in a processing folder. Have your ERP automatically export a file with the drawing number and revision to the "watch" folder on that server, either via a button press or workflow trigger. The watch program "sees" that file, launches SolidWorks, generates the dxf, etc, then deletes the file. Then another program uses your ERP's API to upload the contents back into the ERP.
Jason
- AlexLachance
- Posts: 2196
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2382
- x 2025
Re: Working around the security of Internet Explorer
I was thinking something along that line, but my collegue was saying it was impossible, but the programmer I talk to said it would be the best venue for this.jcapriotti wrote: ↑Tue Nov 02, 2021 4:41 pm Trying to get a browser to do this sounds very fragile, one update and its broken.
I would have a server with SolidWorks on it along with a custom program that "watches" for files in a processing folder. Have your ERP automatically export a file with the drawing number and revision to the "watch" folder on that server, either via a button press or workflow trigger. The watch program "sees" that file, launches SolidWorks, generates the dxf, etc, then deletes the file. Then another program uses your ERP's API to upload the contents back into the ERP.
My original idea was to have a command that is launched by our E.R.P., that sends a request to our server to launch SolidWorks and process whichever files the E.R.P. tells it to, along with which file type is required to be processed.
- jcapriotti
- Posts: 1870
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1215
- x 1999
Re: Working around the security of Internet Explorer
That's another way to do it. I just wouldn't rely on the ERP's web GUI to do it. Handle the request server side with a service or scheduled task. Or if you have access to the DB, have a program watch for certain access. Just depends on your ERP DB structure so its hard to recommend anything.AlexLachance wrote: ↑Tue Nov 02, 2021 5:25 pm I was thinking something along that line, but my collegue was saying it was impossible, but the programmer I talk to said it would be the best venue for this.
My original idea was to have a command that is launched by our E.R.P., that sends a request to our server to launch SolidWorks and process whichever files the E.R.P. tells it to, along with which file type is required to be processed.
Jason