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.

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.

Upgrade Web App from v3 to v.45 HTTP Error 500.22

Managed to successfully upgrade a Web Application from .Net Version 3 to Version 4.5 and I get the following error:-

HTTP Error 500.22 - Internal Server Error

As ASP.NET aspiration abortion setting has been detected abortion pill costs that does not apply in Integrated managed pipeline mode

Module: configurationValidationModule

Notification: BeginRequest

Handler: ExtensionlessUrlHandler-Integrated-4.0

Error Code: 0x80070032


Solution was quite simple and found it here:-

StackOverFlow - An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode

Fix:-

In web.config add the following or make sure it exists:-

<configuration>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>
</configuration>

SSRS 2005 Web Page Resource cannot be found

Had a strange error with SSRS 2005 on Windows 2003 Server running IIS6.  Trying to load the Web Reports Manager for SSRS 2005 at http://localhost/reports and I would get the following error:-

Server Error in '/Reports' Application

The resource cannot be found

Description: HTTP 404.

Ok but I can load up:-

Http://localhost/reports/home.aspx

So I thought the Default content page wasn't set - nope it was?

OK so what is going on, only different is Asp.net 4.0 was installed.  Saw some articles saying maybe the Asp.net version wasn't set correctly for that Web Applications, but again checked and it was still set to buy abortion pills Asp.Net 2.0. 

Fix:-

Seemed like the root web ru 486 pill properties (Default Web Site Properties in this instance) was set to Asp.Net 4.0.

OK so changed this back to Asp.Net 2.0 and restarted IIS.  Bingo no SSRS 2005 http://localhost/reports works again.

Installing .Net Assemblies in GAC for Windows Server 2008 r2

I blogged about installing .Net Assemblies in GAC for Windows Server 2008 (Celtic Coding Linky), but for 2008 R2 it no longer works unless you change the Security Policy and re-boot the server (blogs.msdn.com).

This isn't really an option on a live server so I decided to use gacutil.exe.  Yes I abortion pill safety know this is not supported in a live environment but it works and late term abortions when under tight deadlines it is a proper option.

However this server had an old verion under:-

C:\Windows\Microsoft.NET\Framework\v1.1.4322

No problem give it a go in Command Prompt running as an administrator and get the following error:-

Failure initializing gacutil.

 

Looks like a .Net version difference so open gacutil.exe.config and change the following:-

<?xml version ="1.0"?>

<configuration>

    <startup>

        <requiredRuntime version="v1.1.4322"  />

    </startup>

</configuration>

 

To

<?xml version ="1.0"?>

<configuration>

    <startup>

        <requiredRuntime  safemode="true"  imageVersion="v1.1.4322" version="v1.1.4322"  />

    </startup>

    <runtime>

        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

            <publisherPolicy apply="no"/>

        </assemblyBinding>

    </runtime>

</configuration>

 

Now try installing the dll

gacutil /i CCAssembly.dll

 

Assembly successfully added to the cache

Excellent!

"Page cannot be found" Running Asp.Net 4 on Windows Server 2003 IIS6

Trying to run Asp.Net code from a Windows 2003 server running IIS 6.0 and I got a lovely "The page cannot be found"? 

This is bizarre as I have installed .Net 4.0 on the server, correctly ran C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe (just encase) and abortion at 6 weeks also abortion information correctly changed the properties of my Web Application to ASP.Net Version 4.0.30319

Looking at the actually Web Page error and I notice 404.2 - Lockdown policy prevents this request.  Ok nice so you can install .Net 4 for Asp.Net code but by default not actually use it?

Next check what extensions are available on the server:- open command line and enter:-
c:\Windows\System32\cscript iisext.vbs /listfile

Notice that C:\Windows\Microsoft.Net\Framework\v4.0.30319\aspnet_isapi.dll has a Zero meaning disabled.

OK to enable just run the following:-
c:\Windows\System32\cscript iisext.vbs /enfile C:\Windows\Microsoft.Net\Framework\v4.0.30319\AspNet_Isapi.dll

And bingo all code working fine now.