Monday, June 21, 2010

How to Enable Concurrent Sessions for Windows 7

By Default, Windows 7 only allow one user to login as a time. It is not allowed two users to login concurrently. By there is a way to enable multiple users concutrrently access locally or remotely.

See here for detals:

http://www.blogsdna.com/2336/enable-multiple-user-accessconcurrent-user-sessions-for-remote-desktop-on-windows-7.htm

Tuesday, June 15, 2010

Silverlight 4 & RIA -- MEF and decrypting LoaderExceptions

Have you ever received the following exception while using MEF?

"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

This is usually happend when required assemblies are not "copied to local" folder so that they are not included in Client.XAP file of silverlight.

There are two issues with Visual Studio that make this happen.
1. If a assembly is used and referenced in projects other than the Silverlight project, for example, used in common/data assembly, than the referenced assembly will not be copied to silverlight bin file.

2. If you changed folder structure of your solution, for example you create sub folder for client and client, put each projects under those folders. In most cases, the reference will be refered to its own bin folder.

Silverlight 4 & RIA - MetadataException: Unable to load the specified metadata resource

If subject error occured, you may check following thins:

•Have you changed the MetadataArtifactProcessing property of the model to Copy to Output Directory?

•Have you changed connection string? The connection string could be wrong.

•You might be using a post-compile task to embed the EDMX in the assembly, which is no longer working for some reason.

In my case, there was an error in the connection string

.... metadata=res://*/ProjectName.csdl|res://*/ProjectName.ssdl|res .....