views:

126

answers:

1

I am debugging an application in an Azure sever using IntelliTrace. Sometimes I can see the code that originated an exception but sometimes I can't. And the exceptions which respective code I can't see are always the same.

Is there any reason why I keep getting the same message (No source available) in the new tab when I double click the exception to start debugging it?

I already know what exception is what I need to do to solve it, but I also need to know where to find the code! Help.

Example

@SLaks

An example of the exceptions I get is this:

"The condition specified using HTTP conditional header(s) is not met."

Call stack:

[External Code] 
    System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken = {unknown}) 
[External Code] 
System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken = {unknown})  
System.dll!System.Net.HttpWebRequest.ProcessResponse()  
System.dll!System.Net.HttpWebRequest.SetResponse(System.Net.CoreResponseData coreResponseData = {unknown})  
System.dll!System.Net.ConnectionReturnResult.SetResponses(System.Net.ConnectionReturnResult returnResult = {unknown})   
System.dll!System.Net.Connection.ReadComplete(int bytesRead = {unknown}, System.Net.WebExceptionStatus errorStatus = {unknown}) 
System.dll!System.Net.Connection.ReadCallback(System.IAsyncResult asyncResult = {unknown})  
System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken = {unknown}) 
System.dll!System.Net.Security._SslStream.ProcessFrameBody(int readBytes = {unknown}, byte[] buffer = {unknown}, int offset = {unknown}, int count = {unknown}, System.Net.AsyncProtocolRequest asyncRequest = {unknown})   
System.dll!System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest asyncRequest = {unknown})   
System.dll!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(int bytes = {unknown})  
System.dll!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult transportResult = {unknown}) 
System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken = {unknown}) 
[External Code] 
System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken = {unknown})  
System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode = {unknown}, uint numBytes = {unknown}, System.Threading.NativeOverlapped* nativeOverlapped = {unknown})  
[External Code] 

EDIT:

The exceptions are actually caused by me. Here is an example:

AzureBrightWebRole.dll!AzureBright.Common.EasyPay.EasyPay.CheckFinishedPayments()   
AzureBrightWorkerRole.dll!AzureBrightWorkerRole.WorkerRole.Run()    
Microsoft.WindowsAzure.ServiceRuntime.dll!Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() 
Microsoft.WindowsAzure.ServiceRuntime.dll!Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() 
Microsoft.WindowsAzure.ServiceRuntime.dll!Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.AnonymousMethod()   
[External Code] 

A web service I was accessing to seemed to have stopped working. In the end, I found out, it had nothing to do with it! I reproduced the error locally and it was happening right in my code. Why can't I see the code where the error happened and in which conditions? Although I can't be sure, I don't remember that the code has been changed and it was done today.

+1  A: 

IntelliTrace will only show source code when there is some code to show.

All of the code in the stack trace you posted is inside the .Net framework, so there is no source code to show you.

You can probably get source code here from the .Net Framework Reference Source.

This exception, and many similar ones, are internal to ASP.Net and should be ignored.

SLaks
That makes me feel more confortable. But why do those errors occur?
Fabio Milheiro
@Fabio: These errors occur when the client misbehaves, when optional config files are missing, and in several other cases.
SLaks
@SLaks, I am sorry to say that my suspicions were correct (although they may be wrong in the first case I presented here). In the second case I just presented, exceptions were happening in code that I don't control, but they were caused by me! Read more about this in the EDIT section.
Fabio Milheiro