See: Error redirecting to native URL protocol .
I know that some time has passed since you asked, but this blog post describes the redirection behavior for user protocols.
The bad news is that redirects do not work for IE.
, IE . -, JavaScript window.location.
, MVA WebApi AJAX, Uri, , "" . , .
MVC WebApi
Mvc WebApi nuget , , , : p
TvController.cs
public class TVController: ApiController
{
[HttpGet]
public string TeamviewerConnectUri(int id)
{
return "impacttv://" + Endpoint.tbl_computerinfo.FirstOrDefault().teamviewerID + "::" + teamviewerPassword;
}
}
JS ( jQuery, MVC)
var apiUrl = '/api/tv/TeamviewerConnectUri';
$.get(apiUrl, {id: 1 })
.then(function(uri)) {
window.location = uri;
});
MVC
TvController.cs
public class TVController: ApiController
{
[HttpGet]
public ActionResult TeamviewerConnectUri(int id)
{
return Json(new {uri = "impacttv://" + Endpoint.tbl_computerinfo.FirstOrDefault().teamviewerID + "::" + teamviewerPassword}, JsonRequestBehavior.AllowGet);
}
}
JS ( jQuery, MVC)
var apiUrl = '/tv/TeamviewerConnectUri';
$.get(apiUrl, {id: 1 })
.then(function(data)) {
window.location = data.uri;
});