Celtic Coding Solutions Blog

Celtic Coding Solutions Blog - for everything computer related

Asp.Net Telerik RadAlert RadWindow change globalization language culture

Using Telerik excellent RadAlert within RadWindowManager in an Asp.Net Web Application and I need to translate my website into another language other than English.  So how do we change the RadAlert text on the buttons to be a different language depending on the users browser language settings?

For this I am using an Asp.Net Master Page and including both the RadWindowManager + RadScriptManager e.g.


Next create a Global Resources file for the default language (this case English) and also the language you are catering for (this case German):-


Change the MasterPage's code behind to associate the locatization file with the buttons:-


And that is it, so when a user runs your Web Application in a browser set to German it will now automatically change the buttons to the correct language for things like RadAlert.

Asp.Net Telerik RadGrid change globalization language culture

Using Telerik excellent RadGrid in an Asp.Net Web Application and need to translate my website into another language other than English.  In this case German so first download the resource file from Telerik currently located here:-

Global resources for RadGrid

Pop the file into App_GlobalResources folder or create one if you don't already have it:-


Here I am using the RadGrid.Main.resx (English) and RadGrid.Main.de.resx (German - all versions)

Now it does seem to pick up the language setting of the users browser settings so just do the switch in code (normally under Page_Load:-

if (!IsPostBack)

{

RadGrid.Culture = System.Globalization.CultureInfo.CurrentCulture

}

SSRS 2005 Asp.Net Microsoft.ReportViewer.WebForms unable to load client print control

Using Visual Studio and Asp.Net 3.5 created an Asp.Net application using the SSRS 2005 Microsoft.ReportViewer.WebForms version 8.0.0.0 control.

Trying to print a report directly from http://ServerName/Reports using the little printer button worked fine, the cab was downloaded correctly and installed.  However using the printer button on the custom Asp.Net application resulted in the error "Unable to load client print control.":-


Strange, I checked the Asp.Net web.config and the correct assembly declarations where made:-

<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

Saw lots of posts about installing the following on the server:-

Microsoft Report Viewer Redistributable 2005 

Microsoft Report Viewer Redistributable 2005 Service Pack 1 

Report Viewer Redistributable 2005 Service Pack 1 GDIPLUS.DLL Security Update 

So did this but still the error persisted.

Fix:-

On the server, open "Internet Information Services (IIS) Manager

Open up "Sites" and where you website is located on this I am just using "Default Web Site":-


Then click "Handler Mappings":-


Then click "Add Managed Handler...":-


Under Request Path add:-

Reserved.ReportViewerWebControl.axd

Under Type add:-

Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Under Name Add:-

Reserved.ReportViewerWebControl.axd

So should look like:-


Click OK and restart IIS.

Now you Asp.Net application print button from the Report Viewer control should work.

x64 Windows only 3.25GB of usable memory

Had 8GB of spare memory so popped it into an old Intel Core 2 Duo E4600 and installed Windows 7 x64 bit as the processor was x64 compatible.

Checked windows system and noticed it had 8GB (3.25GB usable).  Strange, so I upgraded the bios to the latest version and checked that it was seeing 8GB, which it was.

Fix:-

I noticed under msconfig.exe (just type it into search and you will find it, or usually under C:\Windows\System32)

Click "Boot" Tab

Click "Advanced options"

"Maximum Memory" was ticked - so I un-ticked it and rebooted

And now I have the full 8GB of ram available.


SSRS Error System.InvalidOperationException: Operation is not valid due to the current state of the object.

SSRS 2005 running on Windows Server 2008 R2 had the following errors as reported on SSRS Logs:-

System.InvalidOperationException: Operation is not valid due to the current state of the object.

Seems to possible causes:-

Installation of Security Update for Microsoft .Net Framework 4 on Servers (KB2656351) and also having large number of parameters or form fields in a SSRS report.

Fix

Open Web.Config for ReportManager usual at:-

C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportManager 

Find <appsettings> in the file and add 2 new keys:-

<add key="aspnet:MaxHttpCollectionKeys" value="10000" />

<add key="aspnet:MaxJsonDeserializerMembers" value="10000" />

So you should see something like:-

<appSettings>

    <add key="ReportViewerServerConnection" value="Microsoft.ReportingServices.UI.WebControlConnection, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

    <add key="ReportViewerTemporaryStorage" value="Microsoft.ReportingServices.UI.ReportViewerTemporaryStorage, ReportingServicesWebUserInterface, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

    <add key="aspnet:MaxHttpCollectionKeys" value="10000" />

    <add key="aspnet:MaxJsonDeserializerMembers" value="10000" />

</appSettings>

Also I recommend changing the Web.Config for ReportServer usual at:-

C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

In this file there is usual no <appsetting> already added so just pop one under the </ConfigSections> part:-

</configSections>

<appSettings>

<add key="aspnet:MaxHttpCollectionKeys" value="10000" />

<add key="aspnet:MaxJsonDeserializerMembers" value="10000" />

</appSettings>

No need to re-start SSRS or IIS, it should just now be fixed.

SSRS Failure Sending Mail - Subscription Error From/Sender missing

Trying to create a new SQL Server 2005 Reporting Services subscription and keep getting the following error:-

Failure sending mail: At least one of the From or Sender fields is required, and neither was found.

I've checked and the To and Reply-To fields have a full email extension e.g. MyName@Company.com

The fix is quite an easy one:-

Look in the RSReportServer.config file usual located in:-

C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer

Search under the <RSEmailDPConfiguration> for <From></From> here I noticed it had the server name so <From>ReportServer1</From>. 

I changed this to be <From>Support@Company.com</From> and now the subscription works fine.

Microsoft Dynamics AX Reporting Project Deployment 2009 - errors

Using Windows Server 2008 R2 and SQL Server 2005 SSRS, trying to install Dynamics AX 2009 reports.

Installed the client and reporting extensions fine and connected to the AOS server.  Running the Microsoft Dynamics AX Reporting Project Deployment setup and it was failing with:-

The following components have not been installed or are not configured correctly:

AL.exe

Microsoft Domain-Specific Language Tools


Fix:-

Looks like you need to download and install 2 files:-

Windows SDK for Windows Server 2008 and .NET Framework 3.5

&

Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package

Run both these setups and run the Microsoft Dynamics AX Reporting Project Deployment again and you now might get the following error:-

The following components have not been installed or are not configured correctly:

Microsoft Domain-Specific Language Tools


Seems like when you run the Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package it just un-compresses the actual setup file on the Hard Drive in my case under:-

C:\VS 2008 Shell Redist\Isolated Mode

Run the following file found in the directory:-

vs_shell_isolated.enu.exe

And then re-try the Microsoft Dynamics AX Reporting Project Deployment again and all should be well - phew!

Setup Orchard CMS using Hosted Solution and Parallels Plesk Panel 9.5.5

Had Orchard CMS working lovely on my local machine (Windows 7 x64) and IIS.  I then wanted it moved to my hosted server and once I copied all the files over I found it was erroring.  Looking at the Orchard CMS documentation it seemed a few folders needed "Modify" permission.  OK this is fairly easy in IIS but how do I do it using my hosted solution.  Thankfully the Parallels Plesk Panel (9.5.5 I'm using) had the ability to do it.

Under Files
Click File Manager

Click Httpdocs (or where you have placed your Orchard CMS files)

Click the padlock next to app_data

Tick the "Replace permission entries on all child objects with entries shown here that apply to child objects.

Tick Modify/ Read & Execute/ List Folder contents/ Read/ Write

Click OK (this might take a while to complete).

You will also need to do the same for the Media/ Modules/ Themes folders.

However I still had issues and found out I needed to give permissions to the "bin" folder too

Just tick Read & Execute/ Read.

Then happily Orchard CMS works perfectly.