1
私はC#(ASP WinForm)で2つのアプリケーションを開発していますC#uriプロトコル
WebからWinFormアプリケーションにいくつかのパラメータを送る必要があります。このために、私は私のアプリは、この接続のためのURIプロトコルを作成することを可能にする機能を書いた:
public static void RegisterURLProtocol(string protocolName, string applicationPath, string description)
{
RegistryKey myKey = Registry.ClassesRoot.CreateSubKey(protocolName);
myKey.SetValue(null, description);
myKey.SetValue("URL Protocol", string.Empty);
Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell");
Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open");
myKey = Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open\\command");
myKey.SetValue(null, "\"" + applicationPath+ "\" %1");
}
私は関数を呼び出すためのコードのこの平和を使用します。私は、送信ASPプロジェクトで
RegisterURLProtocol("mAPP", Application.ExecutablePath, "mAPP Uri Protocol");
このような私のアプリへのパラメータ:
protected void Page_Load(object sender, EventArgs e)
{
Response.Redirect("mAPP://MYPARAMETERS");
}
しかし、私はこのように私のASPページを開こうとすると何も起こりません:
http://mydomain/BlankPage.aspx
どうすればこの問題を解決できますか? Windos 8から
? – Dawnkeeper
windows 10周年の更新 – DevELopE
私はあなたがアプリケーションにカスタムUriスキームを登録することを意味すると思います... Uriプロトコルのようなものはありません。 MSDNを見よう:https://msdn.microsoft.com/en-us/library/aa767914.aspx –