Click here to Skip to main content
15,937,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI Frnds..

I wrote a code to open a exe from application.. Its working fine in visual studio environment but in iis 5.0 its wont work... not even starting the process i confirmed in task manager...

I searched in google and got some points and tried but never works... what i done so far is

1. gave full control for user account.. 2. in admistrative tools -> services -> in IIS -> log on tab allow the interactive to desktop...

I think its a permission pblm.. but how to give permission and what permission to which folder... any help will greatly appreciate...

Additional Info:

the exe is in d: drive

Below is my code:
      rdoc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.CrystalReport, "d:\aspnetprint\docs\" & rcapt & Trim(invno) & Trim(loccode.Replace(".","")) &".rpt")
Dim printstr AS string = "d:\aspnetprint\docs\" & rcapt & Trim(invno) & Trim(loccode.Replace(".",""))& ".rpt"
printstr = printstr.Replace("\","\\")
Dim startinfo As New ProcessStartInfo()
startinfo.CreateNoWindow = false
startinfo.UseShellExecute = False
startinfo.FileName = "d:\aspnetprint\exe\crpck.exe"
startinfo.Arguments = printstr
startinfo.RedirectStandartOutput = True
startinfo.RedirectStandartError = True

     Using exeProcess As Process = Process.Start(startinfo)
End Try

for More info : 1. aspnetprint is a folder name where we saved the exe file
2. d:\aspnetprint\docs is a folder name where we export the crystal report
3. after that exe prints the file the report which we exported in docs folder will automatically deleted
4. rcapt is a caption name, invno is a invoicename to store
5. rdoc is report document object name

Thanks in advance
Updated 26-Jan-12 20:00pm
Sergey Alexandrovich Kryukov 27-Jan-12 0:50am    
Where is the executable file you are trying to run? Is it on server side or not? Why would you ever need it?
nithibs 27-Jan-12 1:41am    
Actually the exe file is in d drive.. i want this exe to print a file....
Rajesh Anuhya 27-Jan-12 1:10am    
can you provide the code.
nithibs 27-Jan-12 1:54am    
Pls refer above.......

1 solution

Process.start() thered not work in iis or hosted web applications
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900