I have a link button as below:
<asp:LinkButton ID="Import" runat="server" Font-Size="Small" Visible="true">Import</asp:LinkButton>
On click of this link button,I want the user to download a .exe file if it is not already present in user's computer or open the existing .exe file if it is already present in the user's computer.
I tried this:
string str = @"C:\Users\Documents\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe";
Process process = new Process();
process.StartInfo.FileName = str;
process.Start();
This works fine in my local machine but the .exe cannot be accessed from the web page once its hosted.I think its possibly because of website security issues (correct me if I am wrong) that it doesn't allow the user to access the .exe location.
This was a little bit of background info.
My question is how do I modify this so that the user can download the .exe to his own machine (since I am not being able to access otherwise) and if he has done so once,the next time he clicks on the link button it opens his previously downloaded .exe ?