如何使用Web服务获取客户端ip,计算机名 [英] how to get client ip,computername using webservice

查看:109
本文介绍了如何使用Web服务获取客户端ip,计算机名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)客户端VB6软件
2)服务器端Web服务(这将是ASPx页面)

1)客户端VB6软件
在这种情况下,将有一种形式具有一个计时器控件.
在表单加载中,初始化所有变量,例如服务器地址和计时器.
在计时器功能中,必须确保它每5分钟仅运行一次.
然后每隔5分钟检查一次内存中正在运行的所有应用程序的列表
-首次检查应用程序列表时,将创建一个包含应用程序名称,开始时间,结束时间和LogId的数组.
-第二次运行时,必须查看是否正在运行同一应用程序,然后只需更新结束时间.
然后使用webservice将其上传到中央服务器.

非常重要-
-当您上传到中央服务器时,Web服务将返回添加了LogID的同一应用程序的列表.
-从Web服务获得的日志ID,应该更新到阵列,以便下次发送数据时也发送该Logid.


到用户Web服务
您必须使用功能GetUrlContent或类似的功能,该功能在Webcafe中使用,该功能基本上将数据发送到url并取回数据.
-

2)服务器端组件.
-这应该是ASPX页面
-应该接受以下参数
http://server.com/Service.asp?Name=< servicename>& Data =<实际数据=">
-它将检查request.querystring("NAME")之类的"NAME"参数,并相应地调用相关函数.
-如果该函数为AddData,则表示您正在从VB客户端上传数据,并且在数据参数中您已经发送了要上传到系统的数据,在这种情况下,它将获取数据并上传到服务器并返回LogID

1) Client Side VB6 Software
2) Server Side WebServices (This will be a ASPx Page)

1) Client Side VB6 Software
In this there will be one form which will have one Timer Control.
In form load initialize all variables like server address, and timer.
In Timer function you have to ensure that it runs only once every 5 minutes.
Every 5 minutes you would then check list of all applications running in memory
- When you are checking list of application for first time you would make an array with appname, starttime, endtime and LogId.
- When you run for second time, you have to see if same application is running then you have to just update the endtime.
Then upload this to the central server using webservice.

Very Important -
- When you upload to the central server, the Web Service will return back list of same application with LogID added to it.
- The log id that you get from Web Service, you should update to the array so that next time when you send data you also send the logid.


To User Webservice
You have to use the function GetUrlContent or something similar, which is used in Webcafe which basically sends data to a url and gets the data back.
-

2) Server Side Component.
- This should be a ASPX page
- It should accept following parameters
http://server.com/Service.asp?Name= <servicename>&Data=<actual data="">
- It will check "NAME" parameter like request.querystring("NAME") and accordingly call a relevant function.
- If the function is AddData then it means from VB client you are uploading data, and in data parameters you have sent data that you want to upload to system, in which case it will take data and upload to server and return back the LogID

推荐答案

在这里不起作用.

这是询问者的期望:
1. 先尝试您要做什么!您可能会发现它并不难.
2.制定看起来像问题/无法解决的问题.

试试看,告诉他们是否遇到问题.
成员将非常乐意提供此类帮助.
It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.


Request.ServerVariables("REMOTE_ADDR" )应该返回客户端IP地址.
Request.ServerVariables("REMOTE_ADDR") in webpage should return client ip address.


这篇关于如何使用Web服务获取客户端ip,计算机名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆