Asp.net Web服务控制台日志记录 [英] Asp.net web service console logging

查看:534
本文介绍了Asp.net Web服务控制台日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何,我可以通过它将.Net Web服务中的事件直接记录到浏览器的控制台中。我的意思是说开发人员工具控制台窗口。

我知道如何从javascript或jquery登录控制台。

我使用jquery Ajax来调用.Net Web服务方法。

我用这个Web方法生成PDF文件,其中包含我提供的HTML内容,然后将生成的pdf文件保存到客户端下载文件夹。



我尝试过:



我使用EVOPDF生成包含当前HTML内容的PDF文件查看页面的

Is there anyway through which i can log events from a .Net Web service directly into the console of a browser. I mean to say the Developer tools console window.
I know how to log into the console from javascript or jquery.
I am using jquery Ajax to call .Net Web Service methods.
This Web method that i have generates PDF file with the HTML content that i provide to and then save that generated pdf file to the clients downloads folder.

What I have tried:

I am using EVOPDF to generate the PDF file with the HTML content from the currently viewed page's

推荐答案

正如内森所说,没有没有。如您所知,您的Web服务代码正在您的服务器上运行,并且无法访问最终用户可能用于调用您的Web服务的浏览器。他们甚至可以使用Windows窗体应用程序或其他东西来调用您的服务,所以不,绝对没有办法进入浏览器控制台。



你可以和应该登录服务器。然后正如内森所说,返回值,但是由客户调用你的服务是否他们用返回值做了什么。
As Nathan said, no there is not. As you know, your code for your webservice is running on your server and has no access to the browser that the end user might be using to call your webservice. They could even be using a Windows Forms app or something else to call your service so no, there is definitely no way to get at the browser console.

You can and should have logging on the server. Then as Nathan said, return values but then it is up to the client that calls your service as to whether or not they do something with the return values.


这篇关于Asp.net Web服务控制台日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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