Thursday, 30 May 2013

Error Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

How to get rid of this error Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list 

The problem is that which version of .Net you are using has not been registered with IIS correctly. Perform the following actions. 

Navigate to  Start -> All Program -> Accessories  right click on Command Prompt and then Run as administrator

If you are using .Net version 4 on a 64-bit 2008 server use these two commands to fix it.

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i 

It will start Installing ASP.NET (v4.0.30319)

 I hope it will resolve your problem.

After this when I tried to run my application on IIS then I got the following database login error.

Cannot open database "Database name" requested by the login. The login failed. Login failed for user 'IIS APPPool\ASP.NET v4.0'.

Change the identity of used Application Pools.

Select the Advanced Setting of your used Application Pools. Change the Identity from ApplicationPoolIdentity to LocalSystem



Now run your application and I hope it will resolve your database login error also.

Sunday, 5 May 2013

How to download Visual Studio 2012 update 2 to 4 offline?

Download Visual Studio 2012 update 2 and update 3 offline?
 
Introduction: Microsoft has lunched a new updation of visual studio 2012 that is called visual studio 2012 update 2. For this you have to download a file named VS2012.2.exe. When you will run this file then latest version of the visual studio will start installing on your system. This installation will be online. Every time this will be online. Every time this require internet connection. If you want to download this setup offline then this article will help you that how can you download this offline?

 
Follow the following steps carefully

Step1: Go to command Promote Display and navigate to the above vs2012.2.exe file.


Step2: write vs2012.2.exe /layout here 

Step3: Specify the path where you want to download this package. Please make sure that you have a sufficient memory. It require 1.80 GB approximate.


Step3:  The downloading process will be start and it gives you a message Setup Successful!


Step4: Go to the window explorer and check the downloaded file.


Step5: Click on VS2012.2.exe wile which is showing in above figure and step is going to start.


Step6: Click more info for more information about your installation. 


Step7: Go back and click on the Install button. Installation will be start.


Step8: This time you will see Installed successfully.


It was working for me.I hope It will also work for you and you will be able to download updated version offline. Due to this you can install on other systems where internet connection is not required. I found this solution after a long search. 

With the similar manner you can download update 3 RC and update 4 RC offline. Download VS2012.3 RC.exe and vs2012.4 RC.exe Rename them to VS2012.3.exe and vs2012.4.exe follow the same process. Downloading will start.

Wednesday, 1 May 2013

How to bind DevExpress Reporting Parameter?

Introduction: This article represents that how can you make a DevExpress reporting Parameter as a dropdown or how can you bind a parameter with a list of values in your LightSwitch Applicaiton? So that you don't want to write any thing in the parameter. Because at the time of writing user can make the mistake.

Gettting help from DevExpress.com
Step to Reproduce

Step1: Go to the Server section in you lightswitch Application and create new report using the DevExpress Reporting tool.

Step2: Create the Parameters on the reports which you want.

Step3: Create a new Screen using the Report Preview Screen. and then click on the write code on that display.


Step4: Call you report by writing the full path of your report like as below.


partial void ReportDaily_Activated()
        {
            // Assign the name of the report, which you want to preview in this screen.
            this.ReportTypeName = "LightSwitchApplication.Reports.DailyReport";
        }

Step5: Run your application and check your report. You will see all the parameters on the report and SalesPerson Parameter is as a textfield.


How can you bind 'SalesPerson' parameter with some values?

Step6: Import two namespaces with your class of DevExpress.


using DevExpress.Xpf.Editors;

using DevExpress.Xpf.Printing;
 
Step7: write the following code to bind your paramter.



public void CustomizeReportPreviewModel(DevExpress.Xpf.Printing.ReportPreviewModel model)

        {
            model.CustomizeParameterEditors += model_CustomizeParameterEditors;
        }
        List<object> SalePersonMasters;

        void model_CustomizeParameterEditors(object sender, CustomizeParameterEditorsEventArgs e)
        {
            if (e.Parameter.Name == "SalesPerson")          //"SalesPerson" is the parameter name which used on Reporting
            {
                var editor = new ComboBoxEdit();
                editor.ItemsSource = SalePersonMasters;
                editor.IsTextEditable = false;
                e.Editor = editor;
                e.BoundDataMember = "EditValue";
            }
        }
        partial void ReportDaily_Activated()
        {
            // Assign the name of the report, which you want to preview in this screen.
            this.ReportTypeName = "LightSwitchApplication.Reports.DailyReport";
            SalePersonMasters = new List<object>();
            var SPName = (from spname in this.DataWorkspace.BooksCrmData.SalePersonMasters
                          select spname).OrderBy(O => O.SalePersonID);
            foreach (SalePersonMaster sale in SPName)
            {
                SalePersonMasters.Add(sale.SPName);
            }
        }
 

Step8: Run your LS application by hitting F5 button and you see your parameter 'SalesPerson' in new look.


Step9: Now the question is that how can you add a default value in the drop-down parameter on the report? Go back to report designer display
 and go to the parameter section add default value for your paramter.

 Step10: Run your application and check that default value has been added on your report.


I hope that the above article will help you to bind the parameter on the reports.

Thanks!