Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
LaunchUriAsync throwing exception when used in JavaScript

I am trying to call LaunchUriAsync from a cshtml view using JavaScript code. Below is my code.

try {
    let appStatus = Windows.System.Launcher.LaunchUriAsync(new Windows.Foundation.Uri("https://www.google.com")).done(
        function (success) {
            console.log("launch complete");
            if (success) {
                console.log("launch success")
            } else {
                console.log("launch failed")
            }
        }, function (err) {
            console.log("launch error")
        });
}
catch (ex) {
    console.log("launch throws")
    console.log(JSON.stringify(ex))
}

I am getting the output "launch throws" but I am getting empty exception logged to console so not really understanding what is the exception that is thrown. Any idea why this might be throwing?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

launchUriAsync with a lowercase l works:

Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri("https://www.google.com"))
    
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!