Welcome Guest Search | Active Topics | Sign In | Register

RegisterCustomSchemes cancel navigation to Link Options
Andreas
Posted: Monday, June 12, 2017 4:34:05 AM
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
eo_support
Posted: Monday, June 12, 2017 6:26:38 PM
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!
Andreas
Posted: Tuesday, June 13, 2017 1:44:42 AM
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?
eo_support
Posted: Tuesday, June 13, 2017 9:18:51 AM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.