我需要调用在客户端上注册的自定义协议(类似于:“custom:signDocs?param1=value?param2=value”)。
我有一个可以通过 JavaScript 在单击按钮时执行的工作。
但我需要调用 url 来执行我在客户端 pc 上的程序。
该程序用于签署文档并将其发送回服务器,并且在代码中我有一个 15 分钟的计时器,它等待文档的状态更改为已签名,然后将文档显示给用户。
我也尝试使用 webrequest:
//Method that uses the webrequest
{
System.Net.WebRequest.RegisterPrefix("customProtocolName", new PrototipoIDPTRequestCreator());
System.Net.WebRequest req = System.Net.WebRequest.Create(protocolUrlWithParams);
var aux = req.GetResponse();
}
internal class CustomRequestCreator : System.Net.IWebRequestCreate
{
public WebRequest Create(Uri uri)
{
return new CustomWebRequest(uri);
}
}
class CustomWebRequest: WebRequest
{
public override Uri RequestUri { get; }
public CustomWebRequest(Uri uri)
{
RequestUri = uri;
}
}
但这无济于事,我不知道它甚至是正确的道路......
有谁知道实现这一目标的方法?