Thursday, May 09, 2013

Microsoft.ReportViewer.Common.dll is missing!

Hi Folks,

If you are having ASP.NET web application that is using Report Viewer control, you should be having the following dlls on your machine:

Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.Common.dll

The first dll, has to be added as a reference in your bin directory while the second one can reside in GAC.

You probably will be getting an error if you don't have the common dll on your machine, first, first check the GAC:  C:\Windows\assembly

If you don't have it, then you need to install Report Viewer Redistributable package.

Here you have to note that the version of the dll will vary based on the installer version.

If you want version 10, you have to install VS 2010 release, here is the link:
http://www.microsoft.com/en-ie/download/details.aspx?id=6610

If you want version 09.00.21022.08 of the dll, you need to install VS 2008 release:
http://www.microsoft.com/en-us/download/details.aspx?id=6576

If you want version 8 of the dll, you need to install VS 2005 release:
http://www.microsoft.com/en-us/download/details.aspx?id=6219


Hope this helps.

Tuesday, May 07, 2013

Import SSIS package error 0xC0010014 when importing SSIS package

Hi Folks,

I'm writing this blog post to share an interesting find while i was developing a SSIS package using VS 2012 with BI tools. Microsoft has release on March this year 2013 BI tools to VS 2012 so you don't need to use VS2010 shell while developing SSIS packages.

The download link for BI tools in VS 2012 is here:
http://msdn.microsoft.com/en-us/library/jj856966.aspx

After i developed my SSIS package and try to deploy it on the SQL Server 2008 R2. I was getting the following error message when importing the package, here is the screen shots:

 
If you are using the Management studio you will get this above error without details!, but to get the detailed error message use SSIS Execute Package Utility, you can launch it from SQL SERVER 2008 R2 --> Integration Services --> SSIS execute Package utility
.


If you read the actual error message it says:
Package Migration from Version 6 to Version 3 failed with error 0xC001700A

Basically the Version that i used to develop the SSIS is higher than the recognized version by the SQL Server 2008 R2. To fix this problem you need to change the package version from 6 to 3 and it works like a charm!

Follow the following steps:
1) Right clich on our dtsx file and select edit, Open the file in notepad.
2) Look for:

      DTS:Name="PackageFormatVersion">6

3) Change the number 6 for the version to 3 and save the file.
4) Select the File System File from the SSIS execute utility and you will not get any errors!
6) From the management studio you can import the SSIS with no errors.

Hope this helps.

[Update 05/09/2013] You will run through other issues if you used VS 2012 SQL Data tools against SQL Server 2008 R2, one of them is the sql job agent will fail to run the imported job due to the xml format mismatch while executing the package. So, it is recommended to develop any SSIS SQL2008 R2 components using the old BIDS VS 2008.


-ME
 

Monday, May 06, 2013

How to convert your WCF Service Library to WCF Service Application

Hi Folks,

If you have a WCF Service Library Project in VS 2012 and after you wrote some functional code and then you decided to change the project from a WCF Service Library that doesn't contain web configurations and can't be hosted in the IIS to a WCF service application that is hosted in IIS, this blog post will tell you how to do it in details.

The WCF service library doesn't contains the Web Configuration Tab when you open the project configuration (By right click on the project --> Project Properties) and it has only app.config file and not web.config file because it is not suppose to be hosted in the IIS.

To change your WCF service library to WCF Service Application:

1) Right click on the wcf project and click on unload project.
2) After the project is being unloaded, right click on the wcf project and click edit the project configuration file ".csproj".
3) Look for the following attribute :

 {3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

Change the project type to the following:

{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}

4) Reload the project.
5) Open the project configuration, you will be able to see the web tab to configure the wcf service.
6) Add web.cofig file to your project.
7) Copy any necassary keys from the app.config to the web.config.
8) Rename or delete the app.config file.
9) Make sure that you have correct port and end point configuration in the web.config.
10) Clean and Build your project. At this point the project is build with no errors.

After you run the project you will see that there is no .svc file that is the service application file used to call the WCF. But you need to have one in your project.

11) First Rename your Service.cs and IService.cs.
12) Add new WCF Service svc to your project and name it as you like.
13) Copy the code you have in the Service Class and the interface to the newly created service.
14) Compile the project.
15) Run the WCF Service application and now your WCF can be accessed through the web.


Note:
This works with VS 2012 project templates with Update 2 as well.

Hope this helps.