PDA

View Full Version : Having a user run a process without full server access


tomkrier
August 2nd, 2005, 05:49 PM
What I have is a user that will want to run a datapump process whenever they need it. I was wondering if it is possible to do, without giving them full server access? All I would want to give them is access to run a process and that is it(I was thinking a webpage with a button or something). I know Datapump uses a web service that is based on .net and xml stuff so I was interested in some ideas how to accomplish this.

Gareth Horton
August 3rd, 2005, 07:05 AM
Tom

You will need to use the web service to accomplish this.

The vb.net and c sharp samples that get installed when you install the web service will provide some pointers on creating such a page.

I know one customer wrote a similar application, where a user clicked on a button in a web page to invoke a process.

Gareth

Originally posted by tomkrier:
What I have is a user that will want to run a datapump process whenever they need it. I was wondering if it is possible to do, without giving them full server access? All I would want to give them is access to run a process and that is it(I was thinking a webpage with a button or something). I know Datapump uses a web service that is based on .net and xml stuff so I was interested in some ideas how to accomplish this.

tomkrier
August 3rd, 2005, 01:16 PM
Is it possible to get his email or something. I am pretty good with asp.net, but I just can't figure it out and I think an example would help me greatly. I did look at the example that you guys have posted and I think that just confused me even more. I guess the two things I need is the command to connect to the server and the command to execute a process. Thats all I would think I would need.

Gareth Horton
August 3rd, 2005, 02:52 PM
Tom

I can't give out the e-mail and I am not sure if the person is still working on their MDP project anyway.

Here are a few steps to get you started, then you can refer to the sample code, which may make more sense after this.

I go the vb.net route, but you can use c# if you like and just amend the steps and the code.

Start VS.NET

New Project|VB Projects|ASP.NET Application

Fill In Location, i.e. http://localhost/mdp_submit_vb

Add a web reference to http://localhost/monarchdatapump/dwchserver.webservice.asmx

It should find this - referred to as "dwchserver.webservice"

OK it and give it a name, i.e. MDP_Web_Service

Now in the designer add a new button, make it pretty wide.

Add the code so it ends up looking like this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mdp As New MDP_Web_Service.DwchServerWebService
Dim TrackID as String
mdp.StartProcess("test")
Button1.Text = TrackID

End Sub Hope this helps.

Gareth

Originally posted by tomkrier:
Is it possible to get his email or something. I am pretty good with asp.net, but I just can't figure it out and I think an example would help me greatly. I did look at the example that you guys have posted and I think that just confused me even more. I guess the two things I need is the command to connect to the server and the command to execute a process. Thats all I would think I would need.

tomkrier
August 3rd, 2005, 07:31 PM
I tried that and I couldn't get it to work. I was able to run a process through "http://chq2kdb785/MonarchDataPump/DwchServer.WebService.asmx"(then going to StartProcess). Is there something else I need to get this running? credentials? stuff like that...

tomkrier
August 4th, 2005, 03:11 PM
After playing around with it somemore. I can either get it to give me a tracking ID, but the process won't start. I tried with the web service and with the pumpapi (just like the example but instead of vb app. its a vb.net app.) I just can't figure it out why it just won't start the process.

tomkrier
August 4th, 2005, 05:15 PM
I finally got it. I had to set MonarchDataPump vitural directory anonymous user to a member of the ads domain that can run processes. that sucked, but I finally got it. Thanks for the help Gareth