CameTooFar

A Nerd's False Positive.

HTTP Error 500.21 - Handler "BlockViewHandler" has a bad module "ManagedPipelineHandler"

Huu…!!!

As usual, jumped into another error when I tried to uploaded nopCommerce CMS kit and browsed for first time.

HTTP Error 500.21 - Internal Server Error
Handler "BlockViewHandler" has a bad module "ManagedPipelineHandler" in its module list

error_iis_nopcommerce_browse


I’s thinking, since I downloaded a ready-made kit, chances of errors should be zero!

Got it! As pre-requisites I installed ASP.NET MVC which had changed the ASP.NET version in my machine. As simple as that, you can fix it by running below command (with admin privilege).

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

solution_aspnet_regiis

Thanks.

AjaxControlToolkit - Could not find any resources appropriate for the specified culture or the neutral culture

It was a surprise when I suddenly see a YSOD in a newly added webpage.

Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "AjaxControlToolkit.Properties.Resources.NET4.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Ah! After some careful look at the code, there it is. I forgot to add the ToolkitScriptManager.

Now that was a silly and careless mistake.Crying face

Regular expression validator firing after postback in asp.net


As usual, I’s really surprised to see what had happened when I attach a regular expression validator to one of my fileupload control. The regular expression validator was firing after every successful fileupload. Yup! The solution is way too simple. Simply, set the IsValid property of the regular expression validator to true.

protected void btnAddDocument_Click(object sender, EventArgs e)
{
    //
    // your logic comes here
    //
 
    regexvalUploadDoc.IsValid = true;
}

That’s it.