How can I run a .exe file on the client side with asp.net 2.0
-
I need to know how to run a .exe file on the client side. i.e.: I need to open winword.exe or excel or acrobat. BiG RaLpH
This is a tetchy issue... for security reasons you can not launch an EXE from ASP .net on the client side (... any hacker could just launch evil exe's). But... if you can: - If you want to just pregenarate an Office doc, you can send it as an stream to the client setting the content file to Excel or Word, it will open the excel file on the client side, maybe embedded on the nagivator. - If you want to open an empty excel file you could send that as an stream (An empty excel file), following the same approach as the previous bullet. - If you need to be able to execute the exe and you are on an intranet, on possiblity could be to have an ActiveX control that is installed on the client machine, BUT That's quite risky, I won't do that (security hole). HTH Braulio
/// ------------------------- Braulio Díez tipsdotnet.com /// -------------------------
-
This is a tetchy issue... for security reasons you can not launch an EXE from ASP .net on the client side (... any hacker could just launch evil exe's). But... if you can: - If you want to just pregenarate an Office doc, you can send it as an stream to the client setting the content file to Excel or Word, it will open the excel file on the client side, maybe embedded on the nagivator. - If you want to open an empty excel file you could send that as an stream (An empty excel file), following the same approach as the previous bullet. - If you need to be able to execute the exe and you are on an intranet, on possiblity could be to have an ActiveX control that is installed on the client machine, BUT That's quite risky, I won't do that (security hole). HTH Braulio
/// ------------------------- Braulio Díez tipsdotnet.com /// -------------------------
-
thx can you plz give me some code? how to send a stream to a .doc or .xls file?
BiG RaLpH
Good samples (using XMLSS): http://support.microsoft.com/kb/319180/en-us[^] http://support.microsoft.com/kb/285891/en-us[this is for ASP 3.0 but quite good^] More info about Excel Generation on ASP .net: http://www.tipsdotnet.com/ArticleBlog.aspx?KWID=51&Area=Excel&PageIndex=0[^] Good luck Braulio
/// ------------------------- Braulio Díez tipsdotnet.com /// -------------------------