|
Rank: Member Groups: Member
Joined: 12/2/2015 Posts: 25
|
Hi we try to call an application with a CustomSchemes-Link <a href="notes://PROMOTOR/1234/5678/912345">Link to Lotus Notes</a>
public override void ProcessRequest(Request request, Response response) { try { Process.Start(@"C:\Program Files (x86)\notes\notes.exe\", "-defini " + request.Url); } catch (Exception e) { Console.WriteLine(e); } }
every thing works fine and we can start the Louts Notes Process with the url as parameter, but in the webView there is a Naviagtion to a blank site, so my question, is there a way to stop this navigation in the webView to the related link (webView.Url is now "notes://..."?
Another question is, is there a default way to take settings from Registry, like the Chrome or IE is working (Configure the CustomSchemes in Registry under HKEY_CLASSES_ROOT\<CustomScheme>\...)?
Thanks for your Support
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Hi,
Do NOT use custom scheme handler. Custom scheme handler is for you to write to Response object. In your case, simply handle LaunchUrl event and move your Process.Start code into there.
Chromium browser engine does not custom scheme configurations from registry. You will need to write that part of code yourself if you wish to support that.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/2/2015 Posts: 25
|
Hi,
thank you, the LaunchUrl-Event and Process.Start works fine. I also try to set UseOSHandler = true and it also works without Process.Start.
Does UseOSHandler takes the settings from Registry or how does it works?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Hi,
Yes. You are correct, we didn't think of this in our previous reply. UseOSHandler is similar to type in the Url directly in Windows File Explorer. It will use whatever file/protocol associations that Windows shell uses.
Thanks!
|
|