Deserializing JSON objects to POCO objects in Silverlight - silverlight

I'm trying to deserialize some JSON objects in a Silverlight client, which are sent over to the client via SignalR.
These objects have been serialized using the TypeNameHandling = TypeNameHandling.All settings.
The first problem is that you can't add a Class library project reference to the Silverlight one, so I have used the trick of creating a Silverlight Class library that contains a link to the POCO classes.
But then I get an error when deserializing, because the JSON string contains the full type including assembly (which is different). If I manipulate the JSON string and replace the assembly name, still get the same error.
These are the POCOs:
public abstract class MessageBase
{
public Exception Exception { get; set; }
}
public class AccessRCImported : MessageBase
{
public DateTime Cob { get; set; }
}
This is the JSON string:
{"$type":"CS.RAR.ICE.Common.Messages.AccessRCImported, CS.RAR.ICE","Cob":"2012-08-01T00:00:00","Exception":null}
Which has been serialized by
var output = JsonConvert.SerializeObject(message,
new JsonSerializerSettings
{TypeNameHandling = TypeNameHandling.All});
// Replace the assembly name
var result = output.Replace(", CS.RAR.ICE.Common", ", CS.RAR.ICE");
var ctx = ConnectionManager.GetHubContext<ServerHub>();
ctx.Clients.Notify(result);
Then on the Silverlight client, I'm doing
var message = JsonConvert.DeserializeObject< MessageBase>(onData, _serializerSettings);
And I get below error. Both the Silverlight app and the Silverlight Client library are targetting Silverlight 5.
Any ideas?
Thanks.
{Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'CS.RAR.ICE.Common.Messages.AccessRCImported, CS.RAR.ICE'. Path '$type', line 1, position 66. ---> System.IO.FileLoadException: Could not load file or assembly 'CS.RAR.ICE, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(TypeNameKey typeNameKey)
at Newtonsoft.Json.Utilities.ThreadSafeStore2.AddValue(TKey key)
at Newtonsoft.Json.Utilities.ThreadSafeStore2.Get(TKey key)
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadSpecialProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadSpecialProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at CS.RAR.ICE.ClientHub.Handle(String onData)}

Related

SSRS 2017 for Form Authentication not working in Windows Server 2016

For SSRS 2017 Form Authentication, I have followed the instructions based on the Microsoft Sample (https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample) and also (https://www.linkedin.com/pulse/ssrs-2017-anonymous-authentication-problem-solved-frans-van-der-geer/), in my Local Machine it works good. But when I did the same steps in Windows Server 2016, it is not working. In the SSRS Log File (ReportingServicesService_2021_08_12_00_09_42.log) it shows as below Error.
SSRS 2017 Version 14.0.600.1669
extensionfactory!ReportServer_0-3!66d8!08/12/2021-08:54:52:: e ERROR: Exception caught instantiating None report server extension: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Samples.ReportingServices.AnonymousSecurity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)
File name: 'Microsoft.Samples.ReportingServices.AnonymousSecurity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Security.Policy.PolicyException: Execution permission cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolveCasPolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.LoadAssembly(String name)
at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.<>c__DisplayClass2.<CreateExtensionObject>b__0()
at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<Run>b__0(Object state)
at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback)
at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.CreateExtensionObject(Extension extConfig, Boolean typeOnly)
.
library!ReportServer_0-3!66d8!08/12/2021-08:54:52:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: Could not load Authentication extension, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. ;
Am I missing any configuration?
By seeing this error, did any one came across this issue and resolved?
Finally fixed with the Microsoft Team's Support by Unblock the DLLs in the Server. Usually, when any files are copied from other computer, by default Windows Server has a protection by blocking those files. Only by check the Unblock checkbox in the File Properties -> General Tab at the bottom, you will find a checkbox saying
This file came from another computer and might be blocked to help protect this computer
Once after this is checked and then start the Report Server and I am able to see the Logon.aspx Page working good. Finally got the Solution.
The above steps is not only for SSRS, for any file that is copied to the Windows Server's Drive, it will protect the file and if it is not accessible, you have to follow the same steps.

Could not load file or assembly 'CMS.OutputFilter' or one of its dependencies opening index.html in browser from VS2013

This problem occurs when my source files are on my E drive, but not when they are in my C: MyDocuments folder.
I am working through Deborah Kurata's AngulaJS Line of Business Applications course on Pluralsight.
I have the following Index.html open in VS2013
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8"/>
<title>Acme Product Management</title>
<script src="js/angular.js"></script>
</head>
<body ng-app>
</body>
</html>
When I right click the code and select
view in browser (Chrome)
I get the following error
This seems to relate to Kentico, which I do have installed.
How do I fix it?
Server Error in '/' Application.
Could not load file or assembly 'CMS.OutputFilter' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'CMS.OutputFilter' or one of its dependencies. The system cannot find the file specified.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'CMS.OutputFilter' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'CMS.OutputFilter' or one of its dependencies. The system cannot find the file specified.]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +39
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +37
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +38
[ConfigurationErrorsException: Could not load file or assembly 'CMS.OutputFilter' or one of its dependencies. The system cannot find the file specified.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +348
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +19
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +39
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +42
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +158
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +950
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +82
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Could not load file or assembly 'CMS.OutputFilter' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9931916
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249
Web.config files are like CSS files, they inherit one another. So if your AngularJS website is an application below your main Kentico site within IIS, it's inheriting those values in the web.config file of the Kentico site. In the web.config file of the AngularJS site, you need to add
<remove name="XHtmlModule"/>
In the <system.webServer><modules> node. This will tell your AngularJS project to not inherit that module.

Visual Studio Borland dll error

hen I run the application within Visual Studio 2012, it works like a charm, but when I try to run the .exe file in the bin folder, I get this error:
System.IO.FileLoadException: Could not load file or assembly 'Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral, PublicKeyToken=a91a7c5705831a4f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral, PublicKeyToken=a91a7c5705831a4f'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Borland.Data.TClassRegistryPackageItem..ctor(String PackageName)
at Borland.Data.TClassRegistry.RegisterPackageClass(String ClassName, String PackageName)
at Borland.Data.Units.DBXCommon.RegisterClassLoader(TDBXProperties DriverProperties, String ClassNameProp, String ClassNameDefault, String PackageNameProp, String PackageDefault, String& ResultPackageName)
at Borland.Data.TDBXDriverRegistry.GetDriver(TDBXDriverDef DriverDef)
at Borland.Data.TDBXConnectionFactory.GetDriver(String DriverName, TDBXProperties DriverProperties)
at Borland.Data.TDBXConnectionBuilder.CreateConnection()
at Borland.Data.TDBXConnectionFactory.GetConnection(TDBXContext DBXContext, TDBXProperties ConnectionProperties)
at Borland.Data.TAdoDbxConnection.Open()
at ProjectGroep9.LoginForm.connSuccess() in c:\Users\Tom\Project2TI\trunk\ProjectGroep9\ProjectGroep9\LoginForm.cs:line 146
at ProjectGroep9.LoginForm.bevestigLabel_Click(Object sender, EventArgs e) in c:\Users\Tom\Project2TI\trunk\ProjectGroep9\ProjectGroep9\LoginForm.cs:line 58
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
UPDATE: Visual studio, when throwing the error says:
can't load assembly Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral,
PublicKeyToken=a91a7c5705831a4f or one of its dependencies.
A PowerShell command gives me following output for the.dll in the interbaseAdo.NETDriver program files folder:
Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral,
PublicKeyToken=91d62ebb5b0d1b1b
If you have Embarcadero RAD Studio installed (I use Delphi XE2 for example), it turns out that their dbExpress drivers are newer than the ones Embarcadero provided with their ADO.NET 2.0 drivers.
So in order to solve your particular issue, you might best change the app.config file in your Visual Studio solution to something like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="Borland.Data.AdoDbxClient" />
<add name="AdoDbx Data Provider" invariant="Borland.Data.AdoDbxClient"
description=".Net Framework Data Provider for dbExpress Drivers"
type="Borland.Data.TAdoDbxProviderFactory, Borland.Data.AdoDbxClient,
Version=16.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b"/>
<remove invariant="Borland.Data.DbxClientDriver" />
<add name="Datasnap AdoDbx Data Provider" invariant="Borland.Data.DbxClientDriver"
description=".Net Framework Data Provider for Datasnap"
type="Borland.Data.TAdoDbxDatasnapProviderFactory,
Borland.Data.DbxClientDriver, Version=16.0.0.0, Culture=neutral,
PublicKeyToken=91d62ebb5b0d1b1b"/>
</DbProviderFactories>
</system.data>
</configuration>
After doing so, there is one minor detail that needs to be performed. You will have to find the location of the dbExpress configuration files called 'dbxdrivers.ini' and 'dbxconnections.ini'. If you place them in the exact same location of your binary executables, it will work. These drivers point to the correct assemblies from Embarcadero.
There is also a bug with setting up a connection to the database, which you may fix by the following workaround. You could lookup all provided dbProviderFactories (ie. the installed drivers) just to make sure your dbExpress drivers are installed correctly. The following method has it built in (just quick and dirty though):
public InterbaseTest()
{
if (null == this.Connection)
{
try
{
/* First list all installed and registered DbProviderFactories */
System.Data.DataTable dt = System.Data.Common.DbProviderFactories.GetFactoryClasses();
for (int i = 0; i < dt.Rows.Count; i++)
Console.WriteLine("{0}: {1}", i.ToString(), dt.Rows[i][2].ToString());
Console.WriteLine("------------------------------------------------------\n");
this.Connection = new TAdoDbxConnection(
string.Format("DriverName=Interbase;Database={0};", this.DatabasePath) +
"RoleName=RoleName;User_Name=sysdba;"+
"Password=masterkey;SQLDialect=3" +
"MetaDataAssemblyLoader=Borland.Data.TDBXInterbaseMetaDataCommandFactory," +
"Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral," +
"PublicKeyToken=91d62ebb5b0d1b1b;GetDriverFunc=getSQLDriverINTERBASE;" +
"LibraryName=dbxint30.dll;VendorLib=GDS32.DLL"
);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
It may seem obvious that this.Connection is of type dbConnection, which is a field in this C# class.
Hope it helps!
UPDATE
Without Embarcadero RAD Studio installed, it may be the case that you lack the .ini files.
The contents are very straightforward, so you may create these files yourself.
The 'dbxconnections.ini' should contain this:
[IBConnection]
;DelegateConnection=DBXTraceConnection
DriverName=Interbase
Database=database.gdb
RoleName=RoleName
User_Name=sysdba
Password=masterkey
ServerCharSet=
SQLDialect=3
ErrorResourceFile=
LocaleCode=0000
BlobSize=-1
CommitRetain=False
WaitOnLocks=True
IsolationLevel=ReadCommitted
Trim Char=False
The contents of the 'dbxdrivers.ini' file (the most important one) should contain:
[Installed Drivers]
DBXTrace=1
DBXPool=1
Interbase=1
MySQL=1
[DBXPool]
DelegateDriver=True
DriverName=DBXPool
DriverUnit=Data.DBXPool
DriverPackageLoader=TDBXPoolDriverLoader,DBXCommonDriver160.bpl
DriverAssemblyLoader=Borland.Data.TDBXPoolDriverLoader,Borland.Data.DbxCommonDriver,Version=16.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
[DBXTrace]
DelegateDriver=True
DriverName=DBXTrace
DriverUnit=Data.DBXTrace
DriverPackageLoader=TDBXTraceDriverLoader,DBXCommonDriver160.bpl
DriverAssemblyLoader=Borland.Data.TDBXTraceDriverLoader,Borland.Data.DbxCommonDriver,Version=16.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
[AutoCommit]
False=0
True=1
[BlockingMode]
False=0
True=1
[WaitOnLocks]
False=1
True=0
[CommitRetain]
False=0
True=1
[OS Authentication]
False=0
True=1
[Multiple Transaction]
False=0
True=1
[Trim Char]
False=0
True=1
[SQLDialect]
1=0
2=1
3=2
[Interbase]
DriverUnit=Data.DBXInterBase
DriverPackageLoader=TDBXDynalinkDriverLoader,DbxCommonDriver160.bpl
DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxCommonDriver,Version=16.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
MetaDataPackageLoader=TDBXInterbaseMetaDataCommandFactory,DbxInterBaseDriver160.bpl
MetaDataAssemblyLoader=Borland.Data.TDBXInterbaseMetaDataCommandFactory,Borland.Data.DbxInterBaseDriver,Version=16.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
GetDriverFunc=getSQLDriverINTERBASE
LibraryName=dbxint.dll
LibraryNameOsx=libsqlib.dylib
VendorLib=GDS32.DLL
VendorLibWin64=ibclient64.dll
VendorLibOsx=libgds.dylib
BlobSize=-1
CommitRetain=False
Database=database.gdb
ErrorResourceFile=
LocaleCode=0000
Password=masterkey
RoleName=RoleName
ServerCharSet=
SQLDialect=3
IsolationLevel=ReadCommitted
User_Name=sysdba
WaitOnLocks=True
Trim Char=False
[Interbase TransIsolation]
ReadCommited=1
RepeatableRead=2
[MYSQL]
DriverUnit=Data.DBXMySQL
DriverPackageLoader=TDBXDynalinkDriverLoader,DbxCommonDriver160.bpl
DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxCommonDriver,Version=16.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
MetaDataPackageLoader=TDBXMySqlMetaDataCommandFactory,DbxMySQLDriver160.bpl
MetaDataAssemblyLoader=Borland.Data.TDBXMySqlMetaDataCommandFactory,Borland.Data.DbxMySQLDriver,Version=16.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
GetDriverFunc=getSQLDriverMYSQL
LibraryName=dbxmys.dll
LibraryNameOsx=libsqlmys.dylib
VendorLib=LIBMYSQL.dll
VendorLibWin64=libmysql.dll
VendorLibOsx=libmysqlclient.dylib
BlobSize=-1
Database=DBNAME
ErrorResourceFile=
HostName=ServerName
LocaleCode=0000
Password=password
User_Name=user
Compressed=False
Encrypted=False
If you include these .ini files within your application folder where your binary is located, stuff should work.

VS2012 Winform designer error

I keep getting the error "Collection was modified; enumeration operation may not execute".
While in design mode for a winform. Project runs fine, just design time which has an issue.
This goes away after opening and closing the project X times (between 1 and 10+ so far), but always comes back at random times (even when no changes have been made to the project or any of its dependencies).
System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List1.Enumerator.MoveNextRare()
at System.Collections.Generic.List1.Enumerator.MoveNext()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblySpecFound(List1 assemblies, String assemblyFullName)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddDependencies(Assembly a, String fileName)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblySpecFound(List1 assemblies, String assemblyFullName)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectDependencies(Project project)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Boolean allowPrivate, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreCase, Assembly& assembly, ReferenceType refType)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetAssembly(AssemblyName name, Boolean throwOnError)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetAssembly(AssemblyName name)
at Microsoft.VisualStudio.Design.VSDynamicTypeService.OnAssemblyResolve(Object sender, ResolveEventArgs e)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Boolean allowPrivate, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreCase, Assembly& assembly, ReferenceType refType)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetRuntimeType(String typeName)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(String typeName)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(String typeName)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(IDesignerSerializationManager manager, String name, Dictionary2 names)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary2 names, CodeStatementCollection statements, String className)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
I think this was a bug that was fixed in Visual Studio 2012 Update 4:
Windows Forms
You may receive the following error message in Windows Forms Designer:
Collection was modified; enumeration operation may not execute
Go to Download Visual Studio 2012 Update 4 to get the update.

System.Windows.Baml2006.TypeConverterMarkupExtension threw an exception

I got this error in a WPf Application when calling the InitializeComponent. In the Designer I get this error:
Could not load file or assembly 'LCP.ScanLite.WindowsWPF, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.Windows.Navigation.BaseUriHelper.GetLoadedAssembly(String assemblyName, String assemblyVersion, String assemblyKey)
at MS.Internal.AppModel.ResourceContainer.GetResourceManagerWrapper(Uri uri, String& partName, Boolean& isContentFile)
at MS.Internal.AppModel.ResourceContainer.GetPartCore(Uri uri)
at System.IO.Packaging.Package.GetPartHelper(Uri partUri)
at System.IO.Packaging.Package.GetPart(Uri partUri)
at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.get_ContentType()
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
at System.Windows.Media.Imaging.BitmapImage.EndInit()
at Microsoft.Expression.Platform.WPF.InstanceBuilders.WpfBitmapCache.GetImageSource(Uri sourceUri)
at Microsoft.Expression.Platform.WPF.InstanceBuilders.BitmapImageInstanceBuilder.InitializeImageSource(IInstanceBuilderContext context, DocumentNode valueNode)
at Microsoft.Expression.Platform.WPF.InstanceBuilders.BitmapImageInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
at Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)
LCP.ScanLite.WindowsWPF is my assembly.
I found the Problem. I change the Assembly name, and all the Image in the Page were link to the old name.

Resources