asp.net - Open a .exe file on click of a link button in C# -


i have link button below:

<asp:linkbutton id="import" runat="server" font-size="small" visible="true">import</asp:linkbutton> 

on click of link button,i want user download .exe file.

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 local machine .exe cannot accessed web page once hosted.i think possibly because of website security issues (correct me if wrong) doesn't allow user access .exe location.

this little bit of background info.

my question how modify user can download .exe own machine (since not being able access otherwise)?

edit:

as turns out ,process.start start process on same machine executing code. cannot use process.start start on user's computer unless execute code on computer. correct ?

use below code

system.diagnostics.process.start("c:\users\documents\consoleapplication1\consoleapplication1\bin\debug\consoleapplication1.exe");  

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -