且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查服务器上是否存在.DMP文件?

更新时间:2023-08-21 20:19:58

此服务正在运行什么?如果它生成了DMP文件(我避免使用该术语的动词形式以避免进一步的厕所幽默:),则表示它运行了一些可通过网络,Web服务或其他方式访问的服务,对吗?

如果是这样,为什么不向服务接口之一添加简单的诊断"功能,该功能将仅根据客户的请求回答您的问题?类似于"GetLoggingStatus" ...

请参阅我对SIFNOk的答复的评论-这是非常不安全的做法.相反,如果在服务界面中包含此诊断功能,则将获得身份验证的好处以及已经使用的相同安全性内容.
—SA
What this service is running? If it produced DMP files (I avoided using the verb form of the term to avoid further toilet humor :)) it mean it runs some service accessible through network, Web service or something else, right?

If so, why not adding a simple "diagnostics" function to one of the service interfaces which would simply answer your question on client''s request? Something like "GetLoggingStatus"...

See my comment to the Answer by SIFNOk — that would be quite unsafe practice. In contrast, if you include this diagnostics function in your service interface, you will get benefits of authentication and the same security stuff you already using... How about that?

—SA


雅各布

我不能确定完整的请求是您要询问的内容,而是可以通过以下方式检查文件位置,从而检查远程服务器上是否存在文件:

Hi agrace

Im not to sure the full request what you are asking but to check whether a file exists on a remote server can be achieved if the file location is known by the following:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       If My.Computer.FileSystem.FileExists(\\REMOTESERVERNAME\C


\FILENAME.DMP) = True Then MsgBox("File Exists") Else MsgBox("file doesnt exist") End If End Sub
\FILENAME.DMP) = True Then MsgBox("File Exists") Else MsgBox("file doesnt exist") End If End Sub




我不确定这是否有帮助,但是会检查文件是否在指定位置.




im not sure whether this will help buts this will check whether the file exists in the specified location.