Click here to Skip to main content
15,886,562 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to open a notepad file in server from an website using
C#
System.Diagnostics.Process.Start()
It's working fine while debugging in visual studio. But when i published the same app in IIS and tried to open, it's not working.

Help me to fix this issue!!!

What I have tried:

Changed application pool identity to local system, but not working..
Posted
Updated 11-Jul-16 22:27pm
Comments
Suvendu Shekhar Giri 12-Jul-16 3:14am    
..and what if someone accessing your website from a mac/linux system?
Member 10571106 12-Jul-16 3:29am    
exe will be run in my windows server only & I'm doing this process in server side code, so i thought it will not create any problem for max/linux users.
Suvendu Shekhar Giri 12-Jul-16 3:32am    
Ok. In that case, it should work. Anything in the error log?
Member 10571106 12-Jul-16 3:45am    
Sorry Suvendu, In my case i didn't get any error...

IIS is running as a service on the server. It runs in "Session 0" which is isolated from user sessions. It does not have a screen connected to it.
Even when the notepad process gets started on the server, no user of your web application will be able to see that.
 
Share this answer
 
Comments
Member 10571106 12-Jul-16 3:49am    
Thanks Bernhard, I don't want to show notepad to enduser, My actual requirement is to work with NCH Software(Audio file converter) exe. So if it's start working in server side, it can automatically convert my file and store in a specified location.

So all the process should run only in server side not client side.
Bernhard Hiller 12-Jul-16 3:56am    
Is that software a command line tool, without any GUI? If so, things could work, but you need sufficient privileges for writing the converted file, and the "IIS user" typically has very limited access rights only. And by the way, do not forget to install that software on the server...
Member 10571106 12-Jul-16 4:01am    
already installed that application in server and we could use that software in command line tool without GUI. So please guide me what are all the access required to make work this process in server.
Your .net code runs on the server so the notepad opens on the server, it only worked on your local machine as your local machine was both server and client but once you deploy to a remote server the notepad still runs on there but as you are no longer the client of that machine you don't see it.

You can't spawn EXEs on the client machine, it would be a massive security risk if you could.
 
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