1
カスタムウィンドウショートカットを作成し、asp.mvcでダウンロードします。 特に、動的サーバーを引数としてリモートデスクトップショートカットをダウンロードできるようにします。ウィンドウのショートカットを作成してASP.NETでダウンロードしてください。
私はこの例をインターネットで見てきましたが、明らかにウェブアプリケーションのためのものではありませんでした。
public ActionResult Download()
{
WshShell wsh = new WshShell();
IWshRuntimeLibrary.IWshShortcut shortcut = wsh.CreateShortcut("/shorcut.lnk") as IWshRuntimeLibrary.IWshShortcut;
shortcut.Arguments = "";
shortcut.TargetPath = "c:\\app\\myftp.exe";
// not sure about what this is fro
shortcut.WindowStyle = 1;
shortcut.Description = "my shortcut description";
shortcut.WorkingDirectory = "c:\\app";
//shortcut.IconLocation = "specify icon location";
shortcut.Save();
return File("/shorcut.lnk", "application/octet-stream", "shorcut.lnk");
}
私はプレーンアクセスが拒否されました。それを行う別の方法がありますか?
を働いていますか? –