Question

I have no problem connecting to my Azure database and running queries against it.

I have no problem creating a DbContext connection to an assembly that points to my Azure database; I can see the tables (entities). But when I try to run a query LINQPad throws an exception:

ConfigurationErrorsException: Couldn't find type for class Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener.

Do I need a different driver? I looked at the list in LINQPad and didn't see an obvious choice.

UPDATE: Following Mikee's suggestion I added a reference to the Microsoft.WindowsAzure.Diagnostics.dll to the LINQPad query with no luck. Then I added a reference in the project to that dll. Now when I run the query I get the exception stack and a more useful message: "Not running in a hosted service or the Development Fabric."

I've clicked around and found nothing helpful but at least the problem definition is getting better.

Was it helpful?

Solution 2

Solved the problem. Commented out the

<system.diagnostics><sharedListeners> 

section in web.config.

OTHER TIPS

Have you tried adding a reference (Query>Properties or F4) to Microsoft.WindowsAzure.Diagnostics.dll located in Program Files\Microsoft SDKs\Windows Azure.NET SDK\v2.2\bin\plugins\Diagnostics folder (on my box)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top