I have a file upload Web application running perfectly fine on IIS 6 server, but when I migrated it to an IIS 7 server, when I try to upload a large file, it throws an error saying: The request filtering module is configured to deny a request that exceeds the request content length. It puzzled me because I have this setting in my Web.config file: <httpRuntime maxRequestLength=”2097151″ executionTimeout=”7200″ /> This setting should allow me to […]
ASP.NET
If you use XML string as parameter to update your SQL database table as I discussed in my last post, if the server is SQL Server 2000 and the XML string contains a datetime string, you will get a SQL error as this: Syntax error converting datetime from character string Cause: When generating XML string from DataTable object, all DateTime values are converted into strings in ISO 8601 format. However, ISO 8601 format is support […]
In my previous post, I discussed how to use TransactionScope to update DataTable objects in a transaction. The biggest shortcoming of using TransactionScope is that several security settings on the server need to be modified in order to make it work, and this may not be feasible for many companies because of the security concern. Today, I will discuss how to use XML and stored procedure to update DataTable objects in transaction. The basic idea […]
I suddenly got this error when I was working on a project in Visual Studio 2005 and trying to switch to the Designer view of a page: ‘asp:UpdatePanel’ could not be set on property ‘ContentTemplate’ The application rebuilds fine and even runs fine, but I just cannot switch to the Designer view. Here is what I did to solve the problem after some search: 1. Exit Visual Studio 2005 2. Go to Administrative Tools –>Services, […]
I noticed that many developers asked this question or similar: After a user clicks a button on a page, my application performs some check, then prompts user for confirmation, then based on user’s response, my application will either continue the process or cancel the process. How can I accomplish this? I wrote an article on Experts-Exchange.com regarding this question and here is the link to it: Display confirmation from code behind before continuing a process […]
In this article, I will show you how to use AJAX PopupControlExtender to build a multiple select DropDownList as this: Firstly, we need an image captured from a standard drop down list as this: I will use this image as the drop down list instead of the built-in ASP:DropDownList control, the reason is that when a drop down list is clicked, its own selections will be displayed and will overlap with the check box […]
It is very easy to generate a vCARD file from an address with ASP.NET so user can later on import the vCARD file to their Outlook Contacts. First, let us take a look at a sample vCARD file. The following vCARD file was generated from Microsoft Outlook 2007: BEGIN:VCARD VERSION:2.1 N;LANGUAGE=en-us:Jeffrey;Jeffrey;;Mr. FN:Mr. Jeffrey Jeffrey ORG:Royal Crown Technologies;Information Technology Department TITLE:Programmer/Analyst III TEL;WORK;VOICE:666-666-6666 ext 666 TEL;HOME;VOICE:666-666-6666 TEL;CELL;VOICE:666-666-6666 TEL;WORK;FAX:666-666-6666 ADR;WORK;PREF:;;Royal Crown Technologies LABEL;WORK;PREF;ENCODING=QUOTED-PRINTABLE:Royal Crown Technologies=0D=0A= P.O. Box […]
I was working on an ASP.NET project today, and suddenly this error came up after I click “Debug”: Unable to attach to ‘WebDev.WebServer.EXE’ (PID: xxxx) using ‘ComputerName’. A debugger is already attached. Do you want to continue anyway? If I click Yes, my browser becomes loading forever. The cause I believe is that the built-in ASP.NET development server in Visual Studio is crashed, but somehow the process is still attached to the debugger. I tried […]
If you are using Windows XP x64 and if you use Visual Studio 2005 to create a virtual directory on local 64-bit IIS as shown in the following screen shot: and you may get an error message like this: Unable to create the virtual directory. Configuring the virtual directory for ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly. The root cause […]
[UPDATE]: The fix in this post may not work on Windows Vista/7 64-bit operating system, if you are using Vista/7 and have the problem specified in this post, then check out the updated post here: https://learningpenguin.net/index.php/2010/08/13/update-how-to-fix-system-data-oracleclient-badimageformatexception-error/ If you use Microsoft’s OracleClient libraries to connect Oracle database in .NET application, you may encounter BadImageFormatException error if the application is running on a x64 machine. The actual error message shows as follows: [InvalidOperationException: Attempt to load Oracle […]