Inventory Web Page - 'Native' embedded DLL  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Re: Inventory Web Page - 'Native' embedded DLL

Postby pricerc » Wed Dec 01, 2021 3:18 pm

/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 518
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 21

Re: Inventory Web Page - 'Native' embedded DLL

Postby Mike.Sheen » Wed Dec 01, 2021 5:37 pm

pricerc wrote: I left a link to in the plugin description.


Ah... that would have been a mistake on my behalf. I often chastise others for not reading instructions properly, and here I am doing the same thing.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Inventory Web Page - 'Native' embedded DLL

Postby Mike.Sheen » Wed Dec 01, 2021 6:45 pm

After installing the Microsoft Edge Webview2 Runtime on Windows Server 2019, I also found it silently fails if it doesn't have write permissions to the UserDataFolder passed to the CoreWebView2Environment.CreateAsync method AND you don't specify a folder for the UserDataFolder of the WebView2 controls CreationProperties.

If you configured also configured the CreationProperties.UserDataFolder with the same folder, only then does it produce an error relating to insufficient write permissions.

I thought I could get away with just using the ProgramData folder - use the same folder as the plugin .dll itself - but that fails silently on Windows Server 2019 - works ok on Windows 10. I noted you used the LocalApplicationData folder, and when I changed to that, it worked on Windows Server 2019 as well.

I dislike things failing silently.

Anyway, you've given us another possibility for the next version - DEV-8922 was considering deploying the CEFSharp package as standard - but it looks like the Edge WebView2 is a cleaner solution and it also has some good resources for deployment - so for us to include the Microsoft Edge WebView2 Runtime when installing Jiwa should be easy.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Inventory Web Page - 'Native' embedded DLL

Postby pricerc » Wed Dec 01, 2021 7:18 pm

Mike.Sheen wrote:After installing the Microsoft Edge Webview2 Runtime on Windows Server 2019, I also found it silently fails if it doesn't have write permissions to the UserDataFolder passed to the CoreWebView2Environment.CreateAsync method AND you don't specify a folder for the UserDataFolder of the WebView2 controls CreationProperties.

If you configured also configured the CreationProperties.UserDataFolder with the same folder, only then does it produce an error relating to insufficient write permissions.

I thought I get away with just using the ProgramData folder - use the same folder as the plugin .dll itself - but that fails silently on Windows Server 2019 - works ok on Windows 10. I noted you used the LocalApplicationData folder, and when I changed to that, it worked on Windows Server 2019 as well.

I dislike things failing silently.

Anyway, you've given us another possibility for the next version - DEV-8922 was considering deploying the CEFSharp package as standard - but it looks like the Edge WebView2 is a cleaner solution and it also has some good resources for deployment - so for us to include the Microsoft Edge WebView2 Runtime when installing Jiwa should be easy.


As I said, the documentation is a little 'vague'. Some settings have to be passed in as "command line arguments" in the form of a string... basically things you could pass to chrome in a shortcut to control the browser.

There was a fair amount of trial-and-error getting to there - "I dislike things failing silently" is a very polite way of saying how I was feeling at times. I had it working, and then not, and then working again, and then not.... I would change something, like the user folder, and then it didn't work.

At the very least, it's supported by Microsoft, so you should expect it to have some longevity, and (new) Edge is now the default browser in Windows, so it might work out-of-the-box in Windows Server v.Next. For your purposes, you can bundle a specific version.

I'll give you bonus points if you make a "JiwaWebBrowser" available for use by plugin writers, with "locked" (no navigation) and "unlocked" modes.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 518
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 21

Re: Inventory Web Page - 'Native' embedded DLL

Postby pricerc » Fri Dec 03, 2021 2:30 pm

For another paid-for option that may be viable: https://nugetmusthaves.com/Package/EO.WebBrowser offers a single .NET assembly. They also have a Chrome-based HTML->PDF rendering library.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 518
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 21

Previous

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest