views:

84

answers:

4

I have a developer tool that I want to run from an internal site. It scans source code of a project and stores the information in a DB. I want user to be able to go to the site, chose their project, and hit run.

I don't want the code to be uploaded to the site because the projects can be large. I want to be able to run my assembly locally on their machine. Is there an easy way to do this?

EDIT: I should note, for the time being, this needs to be accomplished in VS2005.
EDIT 2: I am looking for similar functionality to TrendMicro's Housecall. I want the scan to run locally, but the result to be displayed in the web page

+1  A: 

I want to be able to run my assembly locally on their machine

Sounds like you want them to download the tool and run it from their local machine, does that work for you?

J.W.
That would work, the question is how do i call the tool from the site after they download it
phsr
+3  A: 

You could use a ClickOnce project (winform/wpf) - essentially a regular client app, deployed via a web-server. At the client, it can do whatever it needs. VS2005/VS2008 have this (for winform/wpf) as "Publish" - and results in a ".application" file that is recognised by the browser (or at least, some browsers ;-p).

You might be able to do the same with Silverlight, but that has a stricter sandbox, etc. It would also need to ask the web-server to do all the db work on its behalf.

Marc Gravell
This seems like a possible solution using a webservice to accept the result and have the user go to a page generated from the webservice to check the results before submitting
phsr
Well, presumably you'd have to commit to a db to get the (html) web-server and the web-service to share data... but yes, something like that. You could also just do the check in the client app, and simply commit.
Marc Gravell
A: 

Any code can scan files given the location and permissions. For a website to open an exe on a different machine and permit that to run and get access to the files contained on the web server would require a horrifically low level of security that would mean the entire system is practically completely open to attack. If your system is completely behind a firewall and hence protected from outside intererance then you want to look more at the permissions and less at the code.

To run an exe on a machine try following notepad example, though you may have to use a specified directory as well

ProcessStartInfo psi = new ProcessStartInfo("notepad.exe");
psi.WindowStyle = ProcessWindowStyle.Hidden;

Process p = new Process(); p.EnableRaisingEvents = true; p.Exited += new EventHandler(ExitHandlerToKillProcess); p.StartInfo = psi; p.Start();

and when done dont forget to kill the Process. Alternately use javascript. Either way watch the security permissions and remember the risks of doing this.

Matrim
This is why I am trying to find a solution like http://housecall.trendmicro.com/
phsr
A: 

I would probably write some sort of command line tool or service that does the processing and extraction of project data. Then I would use a page to update/register projects that the web server and the command line tool both have common access to. then at specified times either manually or via cron or similar mechanisms extract the data to your database. once you have this, you just use the website to display last extraction times and the extracted data.

if the projects/end users are on a different subnet etc, then you will need the end users to run the tool and then have it post the data into the database.

MikeJ