如何从到web服务发出请求的客户端的IP地址客户端、地址、web、IP

2023-09-08 08:38:09 作者:棒棒糖

我有一个web服务托管在我的IIS ...我需要找出clientIP地址时,客户端直接使用我的服务

I have a webservice hosted in my IIS... I need to find out the clientIP address when the client use my service directly

如 HTTP://MyIpAddress/MyApplication/MyWebServiceClass.asmx

和是否有可能从客户机读取文件?如果是的话我该怎么办呢?

and is it possible to read file from the client machine? If so how can I do it?

推荐答案

尝试调用

Request.UserHostAddress

的Htt prequest。 UserHostAddress物业

使用关于从客户机访问文件,这将需要通过首先将文件上传到服务器来实现的。

With regards to accessing a file from the client, this would need be achieved by first uploading the file to the server.

检查接下来的文件上传到Web服务:

Checkout the following on uploading files to a web service:

ASMX文件上传

创建一个简单的文件使用.NET