如何为webservice自动创建XML日志文件 [英] How to autocreate XML logging file for webservice

查看:99
本文介绍了如何为webservice自动创建XML日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的webservice中添加一个方法,该方法自动创建一个新的log.xml文件,而不是手动创建它。我正在使用vb.net和soap webservice在visual studio 2010上工作。我需要知道我必须添加这个方法,因为它不是一个web方法吗?

任何帮助表示赞赏



什么我试过了:



在网站上有很多事件需要处理:预渲染,上传......但在这里我不知道是什么处理事件。

I need to add a method to my webservice that creates automatically a new log.xml file instead of creating it manually. I am working on visual studio 2010 with vb.net and soap webservice. I need to know where I have to add this method as it is not a webmethod?
any help is appreciated

What I have tried:

In website there are many events to deal with: pre-render, onload... but here i don't know what are the handled events.

推荐答案

你的问题非常模糊。如果您需要创建XML文件,则此功能已有详细记录。



创建XML文件vb.net - Google搜索 [ ^ ]



如果您的网络服务需要一个Web方法,只需添加一个Web方法即可。如果不可能,请创建一个新类,该类使用一个方法生成日志文件,该方法接受填充日志文件所需的参数。在该方法中,创建日志文件,然后在您需要的任何地方使用该方法。



我们在这里没有太多可以帮助您无法访问您的计算机,您的代码,也无法读懂您的想法或了解您的项目。如果您正在处理您的问题并陷入困境,请随时回过头来清楚地解释您的问题和一些示例代码,以便我们可以尝试复制您的问题。如果你能够做到这两件事,我相信你会得到更有意义的帮助。
Your question is very vague. If you need to create an XML file, this functionality is very well documented.

create XML file vb.net - Google Search[^]

Simply add a web method if you need one to your webservice to do this. If that is not a possibility, create a new class that generates log files with a method that takes the parameters you need to populate the log file. Inside that method, create the log file and then utilize that method in your code wherever you need it.

There isn't much we can help you with here as we don't have access to your computer, your code, nor do we read minds or know anything about your project. If you get working on your issue and get stuck somewhere, feel free to come back with a clear explanation of your issue and some sample code so we can try and replicate your issue. If you are able to do both of those things, I am sure you'll get more meaningful assistance.


这篇关于如何为webservice自动创建XML日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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