Trace.WriteLine在ASP.NET天青 [英] Trace.WriteLine in ASP.NET Azure

查看:142
本文介绍了Trace.WriteLine在ASP.NET天青的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用

Diagnostics.Trace.WriteLine("message", "Information"); 

在我的azure-asp.net这并不在我的Azure计算模拟器显示,
但如果我做同样的从我的工人的作用它的工作原理,任何想法,为什么?

in my azure-asp.net this does not show up in my azure compute emulator, but if I do the same from my worker-role it works, any idea why?

谢谢!

推荐答案

这是与SDK 1.3,对不对?在1.3,默认Web角色与完整的IIS,这意味着你的实际的Web应用程序code是从你RoleEntryPoint不同的应用程序域中运行。我相信,计算仿真器只显示RoleEntryPoint消息(WebRole.cs或WorkerRole.cs)。

This is with SDK 1.3, right? In 1.3, web roles by default run with full IIS, which means your actual web app code is in a different app domain from your RoleEntryPoint. I believe the compute emulator only shows messages from RoleEntryPoint (WebRole.cs or WorkerRole.cs).

要仔细检查,可以尝试在跟踪消息中的OnStart在WebRole.cs;我猜它会显示出来。

To double check, try putting a trace message in OnStart in WebRole.cs; I'm guessing it will show up.

这篇关于Trace.WriteLine在ASP.NET天青的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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