开发者

Saving a file in client machine by calling a web service - ASP.Net & C#.Net

开发者 https://www.devze.com 2022-12-21 15:49 出处:网络
I\'m facing a g开发者_运维技巧reat problem here and i need some clarifications Here is my explanation

I'm facing a g开发者_运维技巧reat problem here and i need some clarifications

Here is my explanation

  • I've a machine Machine1
  • I've hosted a web service WS1 in Machine1
  • I've a client application in Machine2
  • I call the web service WS1 from machine2 and the web service a file in the path sent by the application

Okie works great!

Now,

  • I host another web service in machine1 - WS2
  • The client from machine2 calls WS2 which in turn calls WS1
  • Now WS1 tries to save a file

The question is will the file be saved in Machine1 or Machine2? In my scenario, i guess the file is trying to save itself in machine1 instead of machine2 as WS1 is calling WS2 and WS1 is in machine1. Any ideas?

Thank you

Regards NLV


Where is the file being saved now in your first scenario? Is it sending the file to the client and the client is doing the saving? Or is the server saving a file sent by the client?

It really depends on how you've written the client and the web-service. If the web service (WS1) is physically saving the file to disk, then in scenario 2 it will be saved exactly the same because the web-service (WS1) hasn't changed.

If the client is saving the file, then in the first scenario the file will be saved on machine2 (the client) but in scenario 2, unless WS2 is passing the file back to the client, it will probably be saved on machine1.

More clarification is required here, a relevant code sample of the client, WS1 and WS2 would also be helpful.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号