Archive for the ‘Web’ Category

ASP.NET AJAX Progress Bar Control

Thursday, November 20th, 2008

Original Posting Here…

This not my work.

If you use AJAX in your web app’s, you no doubt have made use of some sort of progress/status indicator that lets the user know that some operation is currently executing.  In the app I am currently working on we use an animated gif for this.  It works great, but sometimes you might find it nice to have more control over the indicator - i.e. interacting with it via JavaScript and styling it using CSS.

image

(more…)

Stop Annoying and Bad Bots

Monday, October 27th, 2008

Original article

.htaccess file

# Deny domain access to spammers and other scumbags
RewriteEngine on
php_flag register_globals off
SetEnvIfNoCase User-Agent “^libwww-perl*” block_bad_bots
Deny from env=block_bad_bots

# Redirect index.php to domain.com
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.ewebsite.biz/ [R=301,L]

# Redirect domain.com to www.domain.com
RewriteCond %{HTTP_HOST} ^ewebsite.biz [NC]
RewriteRule ^(.*)$ http://www.ewebsite.biz/$1 [L,R=301]

(more…)

Fix Application Error

Wednesday, September 10th, 2008

How to fix Server Error in ‘yourApp’ Application

We get asked about this so much it deserves to be shown here. This error doesn’t mean a lot except that your site is broken. That’s not much help to you figuring out why its broken.

The error page does actually tell you exactly what you need to do to proceed, but for some reason, people don’t read it or think that they should not follow these directions. I remember the first time I ran into this error, and I didn’t follow the directions, so you aren’t alone if that describes you..
Server Error in ‘yourApp’ Application
Step 1:

* Open the web.config file of your application.
* Find ‘customErrors mode=”RemoteOnly” ‘.

Step 2:

Replace “RemoteOnly” with “Off”.
*** It is very important that you use capital “O” and lower case “ff”, as the web.config file is case sensitive, and if you get that wrong, you will continue to get the same error, even if you managed to fix the original error.
Step 3:

Run your application again, and you should now see a different error with the stack trace. This is the same way you would see the error if it was running on your own computer.

Cacti and Debian

Tuesday, July 22nd, 2008

The patch can fix the issue

sudo pico /usr/share/cacti/site/include/config.php

replace what is under

/* Sanity Check on “Corrupt” PHP_SELF */

with

if ((!is_file($_SERVER["PHP_SELF"])) && (!is_file($config["base_path"] . ‘/’ . $_SERVER["PHP_SELF"]))) {
if (!is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["PHP_SELF"])) {
if (!((is_file($_SERVER["SCRIPT_FILENAME"])) && (substr_count($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"])))) {
if (!((is_file($_SERVER["SCRIPT_FILENAME"])))) {
echo “\nInvalid PHP_SELF Path\n”;
exit;
}

CSS Menus and General CSS Tips

Friday, June 13th, 2008

http://www.dynamicdrive.com/style/csslibrary

CSS Layout

Friday, June 13th, 2008

http://www.shadow-fox.net/site/tutorial/34-Making-a-Two-Column-Fluid-Layout-With-Rounded-Corners