Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WebService
Hello, this is probably a very noobish question, but I'll ask it anyway, becouse Im new at this Smile | :) ...
Im developing a webservice that clients will use for uploading files to a share point server. Evrything works fine when Im testing this on the development server, but when I try to use this service from a local machine, I get a "file could not be found" exception. Now this is logical becouse this file does not exist on the dev server. Now what must I do so that this will work also on other machines, that are not eaven in the same network as the server that will host the service?
 
For example, when I run the service localy(on the dev server) and I input the path to the file(c:\test.pdf), the file is uploaded normaly, but when I run the service from another machine thrugh the web browser and provide the path for the local file residing on that machine (c:\localTest.pdf), service searches for the file on the dev server file system.
 
So the question is how to tell the web service to search the files from the machine that called the service?
 
Hope this makes my problem more readeble.
 
Thank you for your answer!
Posted 12-Aug-12 23:25pm
pykos560
Edited 13-Aug-12 1:57am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

A web service cannot search the local machine, that's not possible. Your issue is that you wrote code that assumed the server and client were the same, which is clearly not going to be the case. A web service can only answer requests, it cannot do anything proactive, like ask for something, and it sure cannot see the client machine.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 515
1 Maciej Los 340
2 Richard MacCutchan 265
3 BillWoodruff 225
4 Mathew Soji 155
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 13 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100