Вопрос

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.

Это было полезно?

Решение 2

Solved the problem. Commented out the

<system.diagnostics><sharedListeners> 

section in web.config.

Другие советы

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)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top