Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension - entity-framework-core

I upgraded my web api from .netcore2.1 to 3.1 and updated all nuget packages to their latest version.
Now my api throws the following error
{"StatusCode":500,"ErrorMessage":"Internal server error: Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension'
from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation
Stack: at Microsoft.EntityFrameworkCore.SqlServerDbContextOptionsExtensions.UseSqlServer
at MyApi3.Startup.<ConfigureServices>b__4_0(DbContextOptionsBuilder options) in D:\\a\\1\\s\\MyApi3\\Startup.cs:line 58\
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass1_0`2.<AddDbContext>b__0(IServiceProvider p, DbContextOptionsBuilder b)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.CreateDbContextOptions[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass10_0`1.<AddCoreServices>b__0(IServiceProvider p)
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired)\r\n at lambda_method(Closure , IServiceProvider , Object[]
at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.<>c__DisplayClass4_0.<CreateActivator>b__0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
-- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)","SystemMessage":"Method 'get_Info' in type 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension'
from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation."}

I added the following packages and the issue was solved
Microsoft.EntityFrameworkCore.SQLServer (3.1.2)
and Microsoft.EntityFrameworkCore (3.1.2)
Interesting that I got a runtime error not a build error.

Related

Dynatrace.OneAgent.Introspection.MongoDbIntrospection

We have a weird issue, which we think is related to environment setup issue, (we assume both having exactly same setting, as we cant find any different between these 2 machine).
The same piece of code is working in one machine but not other, looking for some advise any hint on how to resolve this. already check this link but no idea is this related to mongodb, as we not combile this. From our project the compile option set to (Any CPU)
Basically this is the basic info about the environment. and solution.
Project, installed
Project 'XXXX.Core' has the following package references
[net6.0]:
Top-level Package Requested Resolved
Microsoft.Extensions.Logging 2.2.0 2.2.0
Newtonsoft.Json 11.0.2 11.0.2
Polly 5.8.0 5.8.0
StackExchange.Redis 2.0.519 2.0.519
StackExchange.Redis.Extensions.Core 4.0.5 4.0.5
StackExchange.Redis.Extensions.Newtonsoft 4.0.5 4.0.5
System.Text.Json 5.0.1 5.0.1
Project 'XXXX.Data' has the following package references
[net6.0]:
Top-level Package Requested Resolved
Microsoft.Extensions.Logging 2.2.0 2.2.0
Microsoft.Extensions.Logging.Abstractions 2.2.0 2.2.0
MongoDB.Driver 2.17.1 2.17.1
MongoDB.Driver.Core 2.17.1 2.17.1
Newtonsoft.Json 12.0.1 12.0.1
System.Data.DataSetExtensions 4.5.0 4.5.0
System.Data.SqlClient 4.6.0 4.6.0
System.Text.Json 5.0.1 5.0.1
Environment
Error
The type initializer for 'Dynatrace.OneAgent.Introspection.MongoDbIntrospection' threw an exception.",
"details": "System.TypeInitializationException: The type initializer for 'Dynatrace.OneAgent.Introspection.MongoDbIntrospection' threw an exception.
---> System.BadImageFormatException: No string associated with token.
The format of the file 'C:\\inetpub\\XXXXXXXXXX..WebApi\\MongoDB.Driver.dll' is invalid.\r\n
at Dynatrace.OneAgent.Introspection.MongoDbIntrospection..cctor()\r\n --- End of inner exception stack trace ---\r\n
at Dynatrace.OneAgent.Introspection.MongoDbAspect.<>c.<OnEnter>b__0_0(ClusterBuilder builder)\r\n
at MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey)\r\n
at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey)\r\n
at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings)\r\n
at MongoDB.Driver.MongoClient..ctor(MongoUrl url)\r\n
at XXXXXXXXXX..Data.MongoAdapter.MongoAdapter..ctor(String connectionString)
in F:\\agent9\\_work\\103\\s\\XXXXXXXXXX..Data\\MongoAdapter\\MongoAdapter.cs:line 19\r\n
at XXXXXXXXXX..WebApi.Startup.<>c__DisplayClass7_0.<ConfigureServices>b__4(IServiceProvider x)
in F:\\agent9\\_work\\103\\s\\XXXXXXXXXX..WebApi\\Startup.cs:line 151\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite callSite, RuntimeResolverContext context)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)\r\n
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)\r\n
at XXXXXXXXXX..WebApi.Startup.<>c__DisplayClass7_2.<ConfigureServices>b__15(String key) in F:\\agent9\\_work\\103\\s\\XXXXXXXXXX..WebApi\\Startup.cs:line 89\r\n
at XXXXXXXXXX..WebApi.Controllers.ProfileController.Get(String locale) in F:\\agent9\\_work\\103\\s\\XXXXXXXXXX..WebApi\\Controllers\\ProfileController.cs:line 83\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location ---\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()\r\n--- End of stack trace from previous location ---\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\r\n
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\r\n
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)\r\n
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)\r\n
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)\r\n
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n
at XXXXXXXXXX..WebApi.Startup.<>c.<<Configure>b__9_0>d.MoveNext() in F:\\agent9\\_work\\103\\s\\XXXXXXXXXX..WebApi\\Startup.cs:line 277\r\n--- End of stack trace from previous location ---\r\n
at XXXXXXXXXX..WebApi.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in F:\\agent9\\_work\\103\\s\\XXXXXXXXXX..WebApi\\Middleware\\ExceptionHandlingMiddleware.cs:line 39"

Connecting MongoDb.Driver (.Net) with SSL throws value cannot be null error

I'm trying to connect a .Net Core API to my SSL protected MongoDB. I can connect using Mongo Compass so I am confident the problem is not in my MongoDB configuration.
Everything was working fine before the certificates were added to the MongoDB and as you'll see the stack points right to the certificates. I just don't know how to correct it.
I wasn't able to find a lot of documentation on how to implement the SslSettings in the MongoDB driver so I'm piecing this together from different sources and SO questions.
The problem seems to come when my API goes to connect to Mongo. I get the following exception.
Value cannot be null. (Parameter 'source')
The stack dump points right to the X509 certificates being the missing / null value.
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Cast[TResult](IEnumerable source)
at MongoDB.Driver.SslSettings.X509CertificateCollectionEqualityComparer.Equals(X509CertificateCollection lhs, X509CertificateCollection rhs)
at MongoDB.Driver.SslSettings.Equals(Object obj)
at System.Object.Equals(Object objA, Object objB)
at MongoDB.Driver.ClusterKey.Equals(Object obj)
at System.Collections.Generic.ObjectEqualityComparer`1.Equals(T x, T y)
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey)
at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings)
at MongoDB.Driver.MongoClient..ctor(String connectionString)
at Bullies.API.Endpoints.Users.UserService..ctor(IOptions`1 config, IMediator mediator) in C:\Users\...\Demo.API\Endpoints\Users\UserService.cs:line 38
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Demo.API.HostedServices.SubscriptionHostedService.<ExecuteAsync>d__2.MoveNext() in C:\Users\...\Demo.API\HostedServices\SubscriptionHostedService.cs:line 32
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>d__9.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.<RunAsync>d__4.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.<RunAsync>d__4.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Demo.API.Program.Main(String[] args) in C:\...\Demo.API\Program.cs:line 22
appsettings.json connection string
mongodb://user:pass#localmongo:12345/MyDb?authSource=admin&readPreference=primary&appname=demoapi&ssl=true
AccessMongoClass.cs
MongoCredential creds = MongoCredential.CreateMongoCRCredential("localmongo:12345", "user", "pass");
var clientCertificate = new List<X509Certificate>()
{ new X509Certificate("Path\\...\\mysite_com.pfx", "privateKeyPassword") };
MongoClientSettings settingz = new MongoClientSettings();
settingz.ApplicationName = "demo-api";
settingz.Credential = creds;
settingz.SslSettings = new SslSettings()
{
CheckCertificateRevocation = false,
//EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12,
ClientCertificates = clientCertificate,
ClientCertificateSelectionCallback =
(sender, host, certificates, certificate, issuers) => clientCertificate.ToList()[0],
ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true
};
MongoClient client = new MongoClient(settingz);
On the mongodb side I see this error:
"ctx":"conn7","msg":"Interrupted operation as its client disconnected","attr":{"opId":1731}}
The Mongo log is VERY long so I'm just picking out what I think is the key line. If you want to see something else I can easily add it.
I would have thought I provided the X509 certificates but clearly I'm missing something.
I assume you don't see this exception if you just create a new client and in the full stacktrace you see ClusterRegistry.GetOrCreateCluster. This logic is called when the driver is trying to reuse previously created cluster that is stored in a static storage(ClusterRegistry). In your case it looks like you create 2 mongoClients from the settings like this:
var clientSettings1 = new MongoClientSettings()
{
SslSettings = new SslSettings
{
ClientCertificates = new X509Certificate2[] { new X509Certificate2(#"path", "pass") }
}
};
// create client 1
var clientSettings2 = new MongoClientSettings()
{
SslSettings = new SslSettings
{
ClientCertificates = null
}
};
// create client 2
if so, it's a bug in the driver, try avoid setting a null in ClientCertificates for example you can assign an empty collection

Get exception when I want to catch a large number of cards in list

#gregdennis I wrote this code to catch all cards in one list:
var requestList = new List("556be3f8e4a6b530c795db6d");
var cardsCount = requestList.Cards.Filter(CardFilter.All).ToList();
I test this in URL with this:
https://api.trello.com/1/lists/556be3f8e4a6b530c795db6d/cards?filter=all&key=[myke]&token=[mytoken]
and I got the correct answer but with Manatee this Exception has thrown:
Exception has been thrown by the target of an invocation.
Inner Exception: Expected ','. Path: '$[849].name'
full stack:
System.AggregateException was unhandled
HResult=-2146233088
Message=One or more errors occurred.
Source=Manatee.Trello
StackTrace:
at Manatee.Trello.Internal.ExceptionHandling.DebugLog.Error(Exception e, Boolean shouldThrow) in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello\Internal\ExceptionHandling\DebugLog.cs:line 26
at Manatee.Trello.Internal.DataAccess.JsonRepository.ValidateResponse(IRestRequest request) in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello\Internal\DataAccess\JsonRepository.cs:line 62
at Manatee.Trello.Internal.DataAccess.JsonRepository.Execute[T](TrelloAuthorization auth, Endpoint endpoint, IDictionary`2 parameters) in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello\Internal\DataAccess\JsonRepository.cs:line 28
at Manatee.Trello.ReadOnlyCardCollection.Update() in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello\CardCollection.cs:line 64
at Manatee.Trello.ReadOnlyCollection`1.GetEnumerator() in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello\ReadOnlyCollection.cs:line 58
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
at OrchidTrello.Program.Main(String[] args) in D:\Projects\Trello API\OrchidTrello\OrchidTrello\Program.cs:line 25
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2146232828
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Manatee.Trello.WebApi.WebApiJsonFormatter.Deserialize(Type type, String content) in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello.WebApi\WebApiJsonFormatter.cs:line 69
at Manatee.Trello.WebApi.WebApiJsonFormatter.Read(Type type, Stream readStream) in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello.WebApi\WebApiJsonFormatter.cs:line 55
at Manatee.Trello.WebApi.WebApiJsonFormatter.<>c__DisplayClass5_0.<ReadFromStreamAsync>b__0() in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello.WebApi\WebApiJsonFormatter.cs:line 42
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpContentExtensions.<ReadAsAsyncCore>d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Manatee.Trello.WebApi.WebApiClient.<ExecuteAsync>d__7`1.MoveNext() in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello.WebApi\WebApiClient.cs:line 98
InnerException:
HResult=-2146233088
Message=Expected ','. Path: '$[944].name'
Path=$[944].name
Source=Manatee.Json
StackTrace:
at Manatee.Json.Parsing.JsonParser.Parse(String source) in C:\Users\gregd\OneDrive\Projects\Manatee.Json\Manatee.Json\Parsing\JsonParser.cs:line 51
at Manatee.Json.JsonValue.Parse(String source) in C:\Users\gregd\OneDrive\Projects\Manatee.Json\Manatee.Json\JsonValue.cs:line 343
at Manatee.Trello.ManateeJson.ManateeSerializer.Deserialize[T](String content) in C:\Users\gregd\OneDrive\Projects\Manatee.Trello\Manatee.Trello.ManateeJson\ManateeSerializer.cs:line 74
InnerException:
this is my version:
<package id="Manatee.Json" version="5.2.0.1" targetFramework="net452" />
<package id="Manatee.Trello" version="1.15.0" targetFramework="net452" />
<package id="Manatee.Trello.ManateeJson" version="1.7.0" targetFramework="net452" />
<package id="Manatee.Trello.WebApi" version="1.0.6" targetFramework="net452" />
There was an issue in Manatee.Json. Please download the latest version (v5.2.1 or higher) to resolve the issue.

COM Exception in Application

I'm trying to upgrade an internal application, the infrastructure will be moving from 2008 to windows server 2012. The application builds presentations from model templates.
I keep getting the attached COM Exception which looks to be associated with Interops, has anyone come across something similar.
PowerPages (Office 14.0)
Document: Model.ppt
Command: {SET PrevPeriodEnd user.PreviousPeriodEnd(PGFromDate)}
Error:
~~ Call Stack Pages 6.9.1 (Build 021)~~
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
Stack Trace:
at Microsoft.Office.Interop.Word.ApplicationClass.Run(String MacroName, Object& varg1, Object& varg2, Object& varg3, Object& varg4, Object& varg5, Object& varg6, Object& varg7, Object& varg8, Object& varg9, Object& varg10, Object& varg11, Object& varg12, Object& varg13, Object& varg14, Object& varg15, Object& varg16, Object& varg17, Object& varg18, Object& varg19, Object& varg20, Object& varg21, Object& varg22, Object& varg23, Object& varg24, Object& varg25, Object& varg26, Object& varg27, Object& varg28, Object& varg29, Object& varg30)
at Pages.PowerPages.Evaluate.DoEvaluate(Collection cExpression)
at Pages.PowerPages.Evaluate.Eval(String sExpression)
at Pages.PowerPages.Commands.HandleSet(String& sStr, Shape& oShape, TextRange& oRange)
at Pages.PowerPages.ProcessFile.ProcessShape(Presentation& oPresentation, Shape& shp, String& sOpenStr, String& sCloseStr, Boolean& bExit, Int32& nSlideID, Int32& nSlidesToReset, Boolean& bAgenda)
at Pages.PowerPages.ProcessFile.ProcessPresentation(Presentation& oPresentation, String& sOpenStr, String& sCloseStr, Boolean& BMaster, Boolean& bAgenda)
at Pages.PowerPages.modAmain.GenerateModel(String[]& aSelectedComponent, Boolean& bNormal)
at Pages.PowerPages.modAmain.Generate2(Boolean bJobRun)
at Pages.PowerPages.ComPowerPoint.Generate(String sThreadID, Int32 nJobID, String sPortcode, String sManager, String sBusinessUnit, Int32 nJobAccountStatusID, Object oBatch, String sOutputFolder, Application oPowerPointApp)
~~~~ Additional Information ~~~~
Exception type: COMException
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computer Data:
Operating System Name: Microsoft Windows Server 2012 R2 Standard
Version: 6.2.9200.0
Platform: Win32NT
Physical Memory - Total: 4294430720, Available: 2845433856
Virtual Memory - Total: 2147352576, Available: 1652203520
Two (obvious) possibilities:
Is word installed? Looks like whatever is calling powerpoint is also calling word.
Is your app running as a 32 bit app? 2008 can be run as a 32 bit OS but 2012R2 is 64 bit and you may need to mark everything as 32 bit. (I think you can use CorFlag.exe to force this)
Thanks, I think I've resolved, the macro called template was in an out of date version of office (.dot and required .dotm.)

MVC3 EE CTP - Format of the initialization string does not conform to specification starting at index 0

I have small MVC 3 Entity code first application, I created table in my local database and took the backup of table and restored the data on winhost web hosting database.
In my web.config I have change connection string to winhost connection starting. it wrosk on my desktop.
I transferred my local application to windows, when access the application I am getting this error.
error coming from this method.
public ActionResult ListRecords()
{
var query = from e in db.Envelopes
orderby e.ReportDate descending
select e;
IEnumerable<Envelopes> top10 = query.Take(25);
return View(top10.ToList<Envelopes>());
}
Error message:
Format of the initialization string does not conform to specification starting at index 0.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Format of the initialization string does not conform to specification starting at index 0.]
System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue) +5025863
System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +132
System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +98
System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +64
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +150
System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +59
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name) +399
System.Data.Entity.Internal.LazyInternalConnection.Initialize() +49
System.Data.Entity.Internal.LazyInternalConnection.get_ConnectionHasModel() +10
System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +252
System.Data.Entity.Internal.InternalContext.Initialize() +16
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +16
System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +61
System.Data.Entity.Internal.Linq.InternalSet`1.get_Provider() +15
System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +13
System.Linq.Queryable.OrderByDescending(IQueryable`1 source, Expression`1 keySelector) +66
Envelopesonly.Controllers.HomeController.ListRecords() in HomeController.cs:84
lambda_method(Closure , ControllerBase , Object[] ) +40
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +267
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +190
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +329
System.Web.Mvc.Controller.ExecuteCore() +115
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +94
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +31
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841105
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Any help fixing this error?
Thanks
SR
Why are you still using the CTP? The release has been out for quite some time. Upgrade, then see if your problem persists. It may be a fixed problem.
The stack trace points out that there is a problem with your connection string.
Fix your connection string, and the problem should dissapear.