Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to control some app by Web Service?
wylix
#1 Posted : Thursday, November 22, 2007 2:13:21 AM(UTC)
Groups: Member
Joined: 11/22/2007(UTC)
Posts: 2


//------------------------------ THIS IS SOLVED - PLEASE READ MY LOWER POST -----------------------------

Hi.
I made an easy web service saved on c:\ as default.asmx. :

<%@ WebService language="C#" class="test" %>
using System;
using System.Web.Services;
using System.Xml.Serialization;
public class test {

[WebMethod(MessageName = "Run Smith",
Description = "Running TestSmith script")]
public void RunMethod()
{
System.Diagnostics.Process.Start("some.exe", "someArg");
}
}

I want to set cassini server so that someone could type my ip adress and the Cassini Web Server Explorerweb service would run. Then after chosing RunMethod some exe would run at the server. The problem is I don't know how to set my web service with cassini. I run "Cassini Web Server Explorer" and registered my asmx file so that ID is 98db1e80-ac58-430f-9219-e16ffae9b9c1 , phisical location is: C:\ and default document is Default.asmx and the specified port is 10000. Then after typing http://localhost:10000/Default.asmx it works but I want to connect to my computer from other comp for example in lan network so that adress would be http://myip:10000/Default.asmx but it doesn't work.

Please help.

PS. Is it possible to wrap exe application into web service so that I could control this app by web service?
Ultidev Team
#2 Posted : Thursday, November 22, 2007 7:45:43 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there.

- Regarding starting a process. If you are plan to use UltiDev Cassini running as a service, than the EXE that you plan to launch should be to work without UI, and under the LOCAL SYSTEM user account. If your EXE has UI and/or has to have higher access rights than LOCAL SYSTEM, then you may consider running UltiDev Cassini Web Server as a regular program, by launching "%ProgramFiles%\UltiDev\Cassini Web Server for ASP.NET 2.0\UltiDevCassinWebServer2.exe". In this case your ASP.NET application should be able to launch an EXE. Please keep in mind that running UltiDev Cassini as a regular EXE may pose a security risk, because the server will be able to execute requests from remote machines. If your application successfully hacked by sending malicious remote requests, the attacker will be able to do everything you do on your machine.

- You should have been able to access your application using http://<ip address>:10000/Default.asmx or by using http://<machine name>:10000/Default.asmx. Please let us know what error message do you get. If you don't get any errors, please install Fiddler on your client machine to trace the request and response and see whether you get response at all. Please also try pinging your server machine from the client machine to ensure there is connectivity.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
wylix
#3 Posted : Thursday, November 22, 2007 9:30:24 PM(UTC)
Groups: Member
Joined: 11/22/2007(UTC)
Posts: 2

I did what you said and it worked. The problem was probably that my ip changed and I didn't saw it. Now it works in Lan network. Thx for your help.

I have another question. Let say that I have some app with ui (some buttons edits listbox and so on) and I want to run Web Service on the same machine where this app is and I want to control this app from other comp in the lan network. Is it possible to easy control this app from other computer by Web Service I don't know maybe there is something in .Net to do such a things. Of course I dont have source code of this application.

If someone could help me with this I would be grateful. For now I know how to run some application by web service. I can try to control it by running some program which simulates mouse moves but is there a better and faster solution?

Ultidev Team
#4 Posted : Friday, November 23, 2007 10:20:54 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there.

Unfortunately we don't have an expertise in how to control inputs of a Windows application from the web service.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (4)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.