Me, Myself and Mayvelous
I deployed the Sitefinity site from local to DEV and STAGING servers and the document uploader works on DEV but suddendly disappear on the STAGING server.
I’ve created a forum post but received no good answers. The dude kept asking me to install Silverlight Tools on all the machines. I don’t understand why we have to install silverlight on all machines and which silverlight exactly to install as there’re browser plugin, silverlight tools, silverlight framwork etc. And I cannot install silverlight tools unless the prerequisites, Visual Studio 2010 and Web Developer Express 2010, been installed which I absolutely don’t want to do. Also on the DEV server, there’s not a single instance of Silverlight installation was there and the uploader’s working just fine so I really had a hard time figuring out the issue with STAGING site. The forum responds were so slow, so I created a ticket and the same dude replied as followed:
Can you enable Firebug and check what errors come up in the Net tab when you try to access the Upload section? Also is there a way to provide RDC to your server so I can inspect the settings in more depth?
Ofcos I don’t want to give RDC access but I checked the Firebug and that really helps figure out the problem.
With the help of Firebug, I got 404 file not found for Telerik.Sitefinity.Silverlight.xap file with the error below:
Unhandled Error in Silverlight Application
Message: 2104 An error has occurred.
Now that’s some good hint, so I checked the path and the file exists on the server so must be the file permission issue; I googled the error message and found out that it’s all to do with missing MIME Types on STAGING server.
I’ve added these 3 types to the server MIME types list and it fixes the problem.
Ref: Configuration IIS for Silverlight Applications
I wasn’t happy with the support but thank god he at least gave me a hint to check with Firebug.
I have this project setup for continuous integration with cruise control. It’s been up and running for quite sometime then suddenly the website starts getting the following errors on every successful build.
Exception Details: System.BadImageFormatException: Could not load file or assembly ‘Microsoft.VisualBasic.Activities.Compiler’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
I did not make any changes to the build configs at all and the site runs fine locally. There is no reference to ‘Microsoft.VisualBasic.Activities.Compiler‘ in my project and it doesn’t have VB code. I found some extra files, see below list, in the deployment bin while comparing the bin assemblies on deployment server and my local. Once remove those files, the site comes back on, but the files are added with every cruise build.
I google a bit to check similar problems out there and found only one link, which was fixed by installing missing SDK or something. I didn’t think that was the right solution for me but got an idea to check for target platform configuration on the solution and project files.
I compare with one of my working project many times using visual studio property window to check for the solution and project file configuration properties but they seemed to be the same, using ANYCPU for the build platform. I didn’t trust the VS property designer so used WinMerge to compare the two files and found that there are some additional configuration lines added to the solution file. So I open the .sln and .csproj in notepad, removed all the extra configs, see the image below, checked back in, forced build the Cruise Control and walah all those craps gone and the site is back to the way it was.
The point I like to make here is that although no error with cruise build, your site can still be broken and freaking Visual Studio design views lie many time so remember to go for the good old way of editing it in notepad.
Note: If you don’t have any working version to compare, just search for “Mixed Platforms” or “x86” in .sln file and “<PlatformTarget>AnyCPU</PlatformTarget>” in .csproj file and remove them accordingly.