开发者

Windows Azure:broken logging after migration to the new SDK 1.3

开发者 https://www.devze.com 2023-02-01 16:07 出处:网络
I\'ve migrated to new SDK 1. (Full-IIS mode) I use the following logging: case TraceLevel.Error: Trace.TraceError(message);

I've migrated to new SDK 1. (Full-IIS mode)

I use the following logging: case TraceLevel.Error: Trace.TraceError(message); break; case TraceLevel.Warning: Trace.TraceWarning(message); break; case TraceLevel.Info: Trace.TraceInformation(message); break; case TraceLevel.Verbose: Trace.WriteLine(message); break;

it worked fine until I migrated to the new SDK. now, logging works only for Worker Roles. Web-Role can log onl开发者_Python百科y inside OnStart-method of WebRole.cs in other cases: logged nothing

I understand that Full-IIS means different domains. so, I must call someway WaIIS.exe from w3wp.exe or ...?


What do you mean that logging isn't working? If you're saying it's not showing up in the compute emulator, that's expected. Full IIS web roles run in a different domain from their RoleEntryPoint implementation (WebRole.cs). In the compute emulator, we always show the RoleEntryPoint trace messages (not the IIS application).

It's probably the same story in Visual Studio, if you're looking there.

If you want, you can work around that by commenting out the element in your ServiceDefinition.csdef. (That will revert to using the "legacy web role," which is hosted under HWC. That's how things used to work in SDK 1.2 and earlier.) There everything's in the same app domain.

If you mean something else (like that Diagnostics isn't picking it up or something like that), let us know what you're doing and how the behavior changed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号