Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
im completely new to web design and making sites.
i just wondering is there any way to run an application on server side when a user click a button on my web site? and if there is please tell me how can i do that.

i have IIS installed on my local pc.

thank you
Posted
Updated 4-May-13 19:32pm
v2
Comments
Zoltán Zörgő 5-May-13 1:34am    
Well, your question is too general to be answered correctly. In general you can do that, but the big question is: what do you want to do with the lunched application? Everything else depends on this question.
reza koohi 5-May-13 1:43am    
hmmm... lets say i have a *.bat file that runs some applications(like notepad or ... anything) on server side. i just want to know how can i achieve that so i can use it later. it was a question for me that is it possible and if yes how! i have a site in my mined that have some web applications on background that i need to start them and stop theme (with a bat file) remotely via the admin page of my site.

1 solution

As Zoltán Zörgő asked you, think before implementing something like this.

And if you really find a requirement, then refer - ASP Net - Run Application (EXE) from ASP.Net C#[^].

Quote:
Solution:

ASPNET user under which application is run should have appropriate security settings.

1. change local policies for APSNET user:
in WinXP: run secpol.msc

go to Local Policies->User Rights Assignment

find "Deny logon locally" and remove ASPNET user from it.
also find "Deny logon .. terminal" and remove ASPNET user from it.



2. Security for files.
if your application needs also to work with files (open, save, etc) you have to change security settings for the folders to allow user ASPNET modify nedeed files.

to do this:
- In Explorer right button mouse click the folder and select "Properties"
- In Security tab, add "ASPNET" in and give desired permissions (Read, Write, Execute, etc).


To test how it works without starting ASP.NET site you can try run in Windows command line:

runas /user:ASPNET "notepad.exe"

it asks you for the password of ASPNET user. enter the password.
if everything is done correct you will see opened application (notepad in our example) in new window.


I've tried this on my Windows XP Professsional and it worked fine.
 
Share this answer
 
v2
Comments
reza koohi 5-May-13 1:59am    
i just want it for learning not to deply anything and security is not important for me right now.
i have IIS 7 on win7.
can you tell me how to do it on win 7?

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