Tuesday, November 10, 2009

Ado command object returns method 'Execute' of object '_Connection' failed

Error: method 'Execute' of object '_Connection' failed

Solution: Check the query used while executing the recordset, it may contain keyword used in the database. In my case, my query is:

select languageid, language from masterlanguage order by languageid

The error occurs because I use a keyword in the query, i.d. language.
To fix the error, either change the column name on the database, or use []:

select languageid, [language] from masterlanguage order by languageid


Friday, November 6, 2009

Disabling web.config inheritance for child application

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'Control' or one of its dependencies. The system cannot find the file specified. (d:\Web\VS\Website\web.config line 82)

Source Error:

Line 77: <httphandlers>
Line 78: <remove path="*.asmx" verb="*">
Line 79: <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false">
Line 80: <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false">
Line 81: <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false">
Line 82: <add path="SecurityImageHandler.ashx" verb="*" type="Control.SecurityImageControlHandler, Control">
Line 83: </httphandlers>

I have an application which has a child (sub folder) application in it. In my case, I added a tag in the parent application:

<add path="SecurityImageHandler.ashx" verb="*" type="Control.SecurityImageControlHandler, Control">

When deployed, an error occurs in the child application, since the assembly added in the parent application is also recognized by the child application. To avoid the child application from reading the tag added on the parent application, we have to remove the tag on the web.config of the child application.

After adding the code to remove the tag, it will look like this:

<remove verb="*" path="SecurityImageHandler.ashx"/>


Pinky award :D

Another award from a sweet friend, Ria Adria ^^


Wednesday, November 4, 2009

Error uploading file in ASP.NET

XML Parsing Error: no element found
Line Number 1, Column 1:

This error occurs because the size of the file uploaded is too big and not handled in the web.config.

Solution: add this tag to the web.config in the <system.web></system.web> section:

<httpRuntime maxRequestLength="2048000">

There's a limitation used in the maxRequestLength. 2048000 is the value I use in VS 2008. If I'm not mistaken, in VS 2003, the maxRequestLength is 1024000. Note that this value is in KB (Kilo Byte).

Sunday, November 1, 2009

Another blog award ^^

Have just got a lovely blog award, my second one, from a friend, Mona ^^

But there is a rule to accept this award.. hehehe... Post it on your blog together with the name of the person who has granted the award, and his or her blog link. Pass the award to 15 other blogs that you’ve newly discovered. Remember to contact the bloggers to let them know they have been chosen for this award.

I don't have too many blogging friends, so I'll just give it to...



Related Posts

Dual Axis not Working in Tableau

Problem : When creating chart with Dual Axis, Synchronize Axis is disabled and cannot be clicked. Cause : Tableau identified this as ...

About Me

My photo
Is an ordinary unNoticed man, with a little knowledge to share and high dreams to achieve. I'd be glad if I can help others, 'coz the only thing for the triumph of evil is for a good man to do nothing. I like English and Chinese language, and know a little about them. Hence, for me, most things can best be expressed in Chinese, some in English, and the rest in others ^^

About Blog

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Popular Posts



Follow by Email