473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

security - web service - vb.net - Help....

Hi,

I have set up a web service which instantiates a class in a vb.net dll.

One of the things the class is required to do is copy a network folder. The
destination might be the same or a different server.

I have tried using Shell(<command string> etc) and
System.Diagnostics.Process.Start(<command string>) to run the command to
accomplish this. Both ways do not error but no folder/files get copied.

If I type the command in a command window it executes successfully - folder
created and files copied. An example of the command I am using is:

"xcopy \\servername1\share$\foldername1\foldername2\thisf older
\\server2\share2$\foldername3\foldername4\thisfold er /E /K /R /O /H /I /Y"

The .asmx page is set for anonymous access and to use the same account that
I am logged on as when the command works from a command window. Web.config
is also set up with <Identity impersonate=true />. The identity used is a
Domain Admin.

If I change the "xcopy" to, for example, "xxcopy" I get the expected "File
not found" error so I guess Shell() and process.start() are at least having
a go.

Anyone able to point me in a direction to solve this?

Thanks for your time if you think about it and apologies if posted in wrong
group(s).

Arth.


Dec 4 '05 #1
1 2053
"arth" <no****@thanks.com> wrote in message
news:Ok***************@TK2MSFTNGP15.phx.gbl...
Hi,

I have set up a web service which instantiates a class in a vb.net dll.

One of the things the class is required to do is copy a network folder.
The destination might be the same or a different server.

I have tried using Shell(<command string> etc) and
System.Diagnostics.Process.Start(<command string>) to run the command to
accomplish this. Both ways do not error but no folder/files get copied.

If I type the command in a command window it executes successfully -
folder created and files copied. An example of the command I am using is:

"xcopy \\servername1\share$\foldername1\foldername2\thisf older
\\server2\share2$\foldername3\foldername4\thisfold er /E /K /R /O /H /I /Y"

The .asmx page is set for anonymous access and to use the same account
that I am logged on as when the command works from a command window.
Web.config is also set up with <Identity impersonate=true />. The
identity used is a Domain Admin.

If I change the "xcopy" to, for example, "xxcopy" I get the expected "File
not found" error so I guess Shell() and process.start() are at least
having a go.

Anyone able to point me in a direction to solve this?

Thanks for your time if you think about it and apologies if posted in
wrong group(s).

Arth.


Hi Arth,

One tip:
Start .bat file and print out the current working directory to see where are
you actually running at. Use pause command to see the results.

HTH,
--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
Dec 4 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Top Poster | last post by:
I was wondering if someone could help me out with some of the "big picture" issues associated with ASP.Net Web services from Windows XP. Any advice will be greatly appreciated! Why, when I...
1
by: Maks Skinder | last post by:
Hello I'm a newbie in a C# programming. Can anyone help me to understand how can I retrieve a dataset from an web service (with sql adapter) and fill some textbox on my windows client? Please...
5
by: Girish | last post by:
Im looking for information on how to build a windows service (not web service) on a .net enabled platform. Now, ive had some experience building services using vc++ 6.0 - and I can tell you its...
1
by: Robin Patra | last post by:
Hi All, We have the following scenerio. Machine 1: webservice is deployed in this machine. Machine 2: UserControl is deployed in this machine. Case 1: Now my requirement is a person from...
2
by: Mike | last post by:
I currnently have a VB6 dll that uses SOAP to talk to a WSDL file (web service), and several other functions that is called from an ASP page. Now my dillemma is with the support of the SOAP toolkit...
5
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason...
2
by: Ray Cassick \(Home\) | last post by:
I am trying to tag an assembly with a minimum requirements check so that it will know if it has the ability to read and write to a specific folder. The problem is that the specific folder is a...
1
by: jeewant | last post by:
Hi, I am creating web service for my company. The web service supposed to pop up windows (web page with url address and unique id) after the user is validated. I did the user authentication part...
1
by: zest4 | last post by:
Getting this error, please help what has to be confugured on Win 2003 server? Server Error in '/' Application. -------------------------------------------------------------------------------- ...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.