Posts

Win XP IIS 5 & Ajax's Update Panel

Came across a problem yesterday, where all of a sudden a website that I was working on behave wildly. The website that I'm working on has a page that would utilize UpdatePanel to add dynamic web control that will be triggered with a click on a node of a TreeView control. I was trying to add control to the page, and all of a sudden I received an error message stating HTTP 403: Resouce forbidden, or some other unknown codes. This is the first time I encounter this kind of issue, which really bugging me because I know that IIS on Windows XP has a limitation on its connection pool(maximum 10). I've never encounter this kind of issue before, so it took me a while to try to do some research with the help of the Internet to see if I could find any solution to this kind of problem. According to one article, it will help by lower down the connection timeout and disable the HTTP Keep-Alive under IIS, which it does help, but then again it will cause Visual Studio 2005 not able to log...

ASP.NET CustomValidator - Changing error message at client side

The ASP.NET CustomValidator server control is very useful because it allows me to write my own validation logic with a few tweak to the settings and a few lines of codes. Not only it will provide server side validation, but it's able to do client-side validation as well. Furhter information about this can be found on MSDN website. The only problem that I have, is that I was not able to change the error message based on validation rules that I set at the client-side validation script. I tried to search on the Internet, and all I came across are either setting the source.errormessage, or the source.innerText attributes. Yet, none of them work for me, and I can't even find anything on MSDN that mentioned about this. So, applying some 'investigating' mind here, I tried to check what will CustomValidator be represented with, and it's represented by a <span> tag. Then, I tried to see if there's any value that I could retrieve in the client-side script by wr...

SQL - SELECT withi a SELECT

I was trying to re-write some of the stored procedures for one of my office project the other day to exclude certain unwanted entries. It was done in such a manner. SELECT * FROM [table_A] LEFT JOIN [table_B] ON [table_A].column_id = [table_B].column_id WHERE [table_A].column_c NOT IN ( SELECT [table_A].column_c FROM [table_A] WHERE [table_A].column_c LIKE '%something' OR [table_A].column_c LIKE '%somethingC' OR [table_A].column_c IN ('value_A', 'value_B', 'value_C') ) I tested it in the SQL 2005 Manager Console, and it works fine. I tried it out as well on the actual website, and it does work as well. However, it did a significant drawback that I was not able to notice. This statement will not return anything, or throwing an exception saying "Timeout operation" when it was trying to return a large number of rows. I can't figure out why it doesn't work...

MySQL - How in the world I check the NULL value of this guy?

I was trying to work on extracting information out from MySQL via ASP.NET. Since MySQL only provides the connector, and I can't really connect to MySQL from ASP.NET via simple configuration steps on the ASP.NET web form or web.config, I have to write my own class to do the job. As it progressed, I found that MySQL behaves differently as compare to SQL Server in terms of handling NULL value. I could simply do a NULL checking on data return from SQL Server with the following syntax. value = (data_table[column_name] == NULL ? NULL : data_table[column_name]); So, since MySQL has provided us with a .NET connector, I would assume that the above would work as well; but sadly, it doesn't. Oh Dear, what has gone wrong with it? When I tried to debug the web form (yes, debugging a web form is possible in Visual Studio 2005), I found out that the NULL value is returned with '{}'. This is not NULL!!! So how should I do this? I was totally mad about this because if the syn...

Online Web Service - How responsive it has to be?

While I was working on a new online web service for my company, the initial idea is to process the request that came in immediately, and have the response to be posted back immediately as well. It does not seems wrong, but in reality this is not a practical way to do. Indeed that nowadays the Internet has given us a lot of freedom in accessing a lot of information almost instantly. Thus, it would be normal to judge in such a way that if I could get my response back within a few seconds, then why i.e. your service can't do it? There are a lot of factors that we need to deal with. In my case, I need to deal with 2 major issues - the time taken to process the request, and the time taken to send out the response. Both are affected by external factor, i.e. mail server, how fast it could send out the email. I used to think that there would be mail server software out there some where that could do something like allowing third party software to do extensive processing, of which case...

Online Web Service - What is the best way to develop it?

I've been working with online services since the first day I joined Handisplay. Back then, I was working with classic ASP as the front end, while writing the back end code using Active X (in DLL format) written in C++, my favourite yet hard-to-master programming language. Since then, I've tried to work with different kind of programming languages and technologies: Java Servlet, JSP, SQL Server, MySQL, Linux C++, and now ASP.NET with C#. Looking back since the first day that I stepped into the real world, there are a lot of things that I need to pick up on my own, of which I'm sure everyone would agree with me. What I have learned during my time in university was just basic fundamental, of which it was useful enough for me to expand on it. Though I've heard a lot of people saying that the university should teach certain programming languages, yet the reality doesn't seems to work that way. The reason is simple, as the technology is advancing in a considerably fa...

ASP.NET - ReportViewer & Report

In the new ASP.NET 2.0, there is a control called ReportViewer, which could be used to display a report. It provides a lot of in-built functionality that could ease website development, such as sorting, page navigating, printing, and even exporting it into Excel. As mentioned above, ReportViewer is used to display a report. It acts as a container to display a report with RDLC extension (.rdlc), much like a web brower is used to display web page in HTML format. One container can be used to display report file, but it cannot used to display more than 1 report at the same time, unless it's a nested report (report within a report). RDLC is basically a template, where we could drag and drop the desired controls to create our own report. The underlying language is actually XML. The process to develop a ReportViewer is quite straight forward, but it can be very complicated at time as well do deal with. In Visual Studio 2005, the ReportViewer control is placed under the section Data ...