CoverYourASP --> Newsletter archives

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
149 active users
3176 visitors today
2355 pages today
(only part of today)
Tools I use

CoverYourASP
Copyright © 1999-2016 James Shaw.
All rights reserved.

ASP.NET Blog
RSS submissions
E-commerce

Now open source with SourceForge!

Pick a newsletter to read - you can receive these every Saturday by subscribing.

You can also read the article that describes how this is implemented.

undefined NaN NaN

Jun 5 2002

Apr 30 2002

Mar 31 2002

Feb 28 2002

Jan 23 2002

Jan 22 2002

Jan 15 2002

Jan 14 2002

Jan 7 2002

Dec 24 2001

Dec 11 2001

Nov 27 2001

Nov 12 2001

Aug 1 2001

Jul 14 2001

Jun 24 2001

Jun 10 2001

May 26 2001

May 12 2001

Apr 30 2001

Apr 22 2001

Apr 14 2001

Apr 8 2001

Mar 29 2001

Mar 24 2001

Mar 17 2001

Mar 10 2001

Mar 3 2001

Feb 24 2001

Feb 17 2001

Feb 10 2001

Feb 3 2001

Jan 27 2001

Jan 20 2001

Jan 13 2001

Jan 6 2001

Dec 30 2000

Dec 23 2000

Dec 16 2000

Dec 9 2000

Dec 2 2000

Nov 29 2000

Nov 25 2000

Nov 18 2000

Nov 11 2000

Nov 4 2000

Oct 28 2000

Oct 21 2000

Oct 14 2000

Oct 9 2000

Oct 7 2000

Oct 3 2000

Oct 1 2000

Sep 29 2000

Sep 27 2000

Sep 25 2000

Sep 23 2000

Sep 21 2000

Sep 18 2000

Sep 14 2000

Sep 11 2000

Aug 1 2001

____________________________________________________________

              C o v e r Y o u r A S P . c o m

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

What a fun two weeks! Three very cool new features have been
added to the site - first, a huge new job section covering
the whole IT industry is now live.

Built in association with DeveloperNetworks.com
http://jobs.CoverYourASP.com/ has already proven a popular
place to check out your next employer!

Second, the CoverYourASP store is now open. I just had to do
it for a laugh! I don't make a cent off the items for sale,
but if you need a new mug, cap, or even boxer shorts you
know where to go.

And, no, unfortunately they wouldn't let me print the CYA
logo in the obvious position on the boxer shorts. =;-)

Check it the store at http://www.cafepress.com/CoverYourASP/

Last but definitely not least Charles Carroll of
http://LearnASP.com and http://ASPlists.com/ fame has
created a mailing list just for you and I to discuss the
CoverYourASP code, and to continue to build the great
CYA community we have!

More on that later...

____________________________________________________________


        A   W O R D   F R O M   M Y   S P O N S O R S

                http://www.nsoftware.com/
____________________________________________________________


IP*Works! V5 ASP Edition includes 35 components, optimized
for Active Server Page programming.  The standard IP*Works!
components are all included, HTTP, FTP, SMTP, POP, IMAP,
REXEC etc. Also included are new, higher level components
such as WebUpload, WebForm, FileMailer, TraceRoute, and
more.  

The package includes sample ASP pages demonstrating how to
access Web Services such as Yahoo Stock Quotes and UPS
Address Verification.

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last 2 weeks

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________
______

15 Jul
______

- The site had some serious problems this weekend! Starting
Friday PM the site was down almost all weekend - with only
300 page views by 7pm Sunday you understand the enormity
of the problem.

My mail was probably bouncing too, so if you sent me one
please send it again. Sorry!

______

16 Jul
______

- Many thanks to the Rene Lariviere and Mark Johnson who
reported that their IE6 crashes when visiting my front page.
It turns out that some (but not all) versions of IE6 don't
like the iframe that this diary appears in!

For now I have disabled the diary for IE6 users, but to see
if it crashes for you you can append ?ShowIE6 to the URL:

http://CoverYourASP.com/default.asp?ShowIE6

______

20 Jul
______

- Fancy a pair of boxer shorts with the CoverYourASP logo?
Thought not! But if you did, you could buy some at the
CoverYourASP store! [1]

Get your mugs, mouse mats, T-shirts here too...

[1] http://www.cafepress.com/CoverYourASP/

______

24 Jul
______

- It's a little late to mention this, but tonight is the
Atlanta ASP User Group meeting - read all about it [1].

Tonight Kenny Jones from Microsoft is talking about
"ADO.NET: Powering Data Access in ASP.NET Applications."

See you there?...

[1] http://www.aspusergroup.com/atlanta/index.asp

______

25 Jul
______

- I'm proud to announce a huge new section on CoverYourASP -
jobs[1]!

Many of you have asked the best way to get yourself a job
working with ASP - now you need look no further. Good luck!

[1] http://jobs.CoverYourASP.com/

____________________________________________________________


        A   W O R D   F R O M   M Y   S P O N S O R S

                http://www.WebServerList.com
____________________________________________________________


                Ready for a Dedicated Server?

              Start shopping for your web server
              today. Take control of your web
              server and realize the benefits of
              increased  reliability and security

   Visit Web Server List at http://www.WebServerList.com

____________________________________________________________

              H E R O   O F   T H E   W E E K !
____________________________________________________________

Steve Gibson of http://grc.com/ is this weeks hero.

I've mentioned his website briefly before when recommending
that you read his article[1] about battling a DDOS attack
against his site, but this week I'm concentrating on his
Shields UP! online utility[2].

My development computer at home has a permenant cable
connection, and I leave my computer turned on 24/7, so I'm
a perfect target for people trying to find computers to use
for directing DDOS attacks.

Previously I had used the free ZoneAlarm software[3] to
protect my computer, but a number of minor problems made me
uninstall that a few months ago.

Since then I've been meaning to try another solution, and
after running Shields UP! I finally have solved the problem
by buying a LinkSys router[4].

If you haven't tested your computer security with Shields UP!
DO IT NOW[1]. My computer was  w i d e  open. After simply
plugging in the new router (it was that easy) my computer
does not even appear to exist to anyone probing my IP address.

Now THAT's Stealth mode.

By the way, buy.com was the cheapest place to find the router,
and were excellent. The router got shipped same day, and
arrived 2 days after placing the order. At $84 (after $15
rebate), this router is a steal.

[1] http://grc.com/dos/intro.htm
[2] https://grc.com/x/ne.dll?bh0bkyd2
[3] http://zonealarm.com/
[4] http://www.us.buy.com/retail/computers/product.asp?sku=10235958&loc=219

____________________________________________________________

           R E C O M M E N D   T H E   S I T E !

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

OK, more about our mailing list. To start small I'm not
announcing it on the site yet, instead just telling
newsletter subscribers and members. You get to go first!

The list is fully moderated by me, so there won't be any
off-topic mails getting through - if it's not about CYA, it
won't be here. There are already hundreds of asplists to ask
other questions on - 9,000,000 emails last month were moved
by http://asplists.com/ !

______

To subscribe/unsubscribe from the list, visit:

  http://asplists.com/asplists/aspcya.asp
______

I think it's going to be great. And don't think that you have
to just listen - if you know the answer to a question or have
some tips or tricks, speak up!

Everybody is welcome. There are some very experienced ASP
developers and some complete newbies - and me somewhere in
the middle. =;-)

____________________________________________________________

               N E E D   A N   A S P   I S P ?

        Use mine. You won't find a nicer bunch of guys.

           Cheap, efficient and extremely helpful.

                  http://EverPlanet.com/
____________________________________________________________

More and more people are moving their sites to EverPlanet -
even some famous ASP sites like http://FuzzySoftware.com/
and a soon-to-be-released "kickin" ASP site. (hush) =;-)

Whether you want to host a little site like my friends cute
http://BuggyBagg.com/ or a 1,000,000 page view monster, call
Chris Oak at 770 234 9909 and have a chat. He's a nice guy.

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Steve Smith (President of ASP Alliance):

"You don't need application.lock and unlock in
application_OnStart -- it's only ever executed once, single
threaded, so there are no concurrency issues.  (that's the
one place where you can avoid using lock/unlock)."

Me:

Thanks. I guess I knew that but have such an in-grained habit
of using Application.Lock and Unlock they slipped in!

______

Andrew Haslett:

"Hi James, First of all.. great site. Have found it very
useful even though I'm a VB script man! lol

Anyway, was reading your article about rendering blocks and
the feedback section and remembered reading a test that had
been done.  You may find the experiment done by Ken Schaefer
quite interesting.. he's a pretty reputable source and
contributes to a number of newsgroups that I frequent
(eg p2p.wrox etc)

Anyway, it can be found here:  
http://www.adopenstatic.com/experiments/stringconcantenation.asp

Cheers, Andrew"

______

David Levine:

"Thanks for the site and the link to the HitBox Doctor[1].
First thing I usually do is run a program like the one you
listed against the sites own homepage.

They should use their own tool! Try entering their home page
http://www.hitbox.com as the site to check..."

[1] http://resources.hitbox.com/cgi-bin/page.cgi?tools/doc

Me:

hehehe! That *is* a little bizarre!

______


Hi Fredrik.

______


Dan McKelvy:

"James, I am writing to thank you for all the wonderful
examples. They have been an invaluable aid in my quest to
learn ASP. I was hoping you could help by answering a
question concerning MapPath. I understand it is used to
translate a relative path to an absolute path on the server.

The question is how does it even know what the relative
path is? You pass it a filename only. If I assume the file
could be stored in any directory how does MapPath know what
to return?

If I send MapPath a NULL will it return the server path
associated with the main directory of the URL. This would
look something like:

sPath = Server.MapPath('') might return:
sPath = "d:\\www"

I know the folders that exist and what files are in them.
What I do not know is how to determine the root path for
my files and folders as the server sees them.

Thanks for any help you can offer, Dan"

Me:

MapPath does different things depending on the first
character in the path sent in.

If it starts with / the path is treated as a virtual path,
and the physical path computed from there.

If it starts with another character the path is computed
relative to the position of the asp file calling it.

So, calling

Server.MapPath ( '/images/hello.gif' )

from an asp page in

C:\Inetpub\Wwwroot\

would return

C:\Inetpub\Wwwroot\images\hello.gif

To see where (physically) your current asp page is, you
could do this:

Server.MapPath ( Request.ServerVariables("PATH_INFO") )

______

Conan:

"...for those who have their 404 handling file sending
out emails!

Opening my Outlook Inbox this morning I was greeted with
no less than 6800 emails from my web-site! ALL 404's, all
from Internet Explorer 3.02, and ALL seemed to be the
result of HREF's that include JavaScript somehow.

Your site gets quite a bit more coverage than any of mine,
I hope you will include a little mention of this in your
diary or newsletter somewhere to warn any would-be-hapless
webmaster!"

Me:

Yes, we've talked about this before. I can't remember the
last time I got a 404 email from the site that was actually
a missing file. They are all browser bugs! Nevertheless,
they're handy to know and sometimes worth fixing.

A better solution anyway is to add the file info to an
Application variable[1] and send a single email once an
hour or so...

[1] http://CoverYourASP.com/Application.asp

______

Here's an email I snagged from one of the private ASPACE mailing
lists that I was kindly invited to join recently...this was from
a thread started when I asked about port scanning:

G. Andrew Duthie:

"Here are some good resources for hardening an IIS box (I just
finished a chapter on Security for one of the ASP.NET books I'm
working on):

http://nsa2.www.conxion.com/win2k/download.htm - Guides from the
NSA for securing Win2K, IIS, and other MS software. Good stuff.

http://www.microsoft.com/technet/security/notify.asp - site to
subscribe to Microsoft's Security Notification Service...one way
to keep up with when you need to install patches.

http://www.microsoft.com/technet/security/tools.asp - List of
security tools offered by Microsoft, including the IIS Hotfix
Checker, IMO the BEST way to automate making sure that your
server(s) have the latest patches installed. I use this, and
modified the scripts to send me email when a new patch is
available (instructions on how to do this are included with the
tool).

http://www.microsoft.com/technet/security/iis5chk.asp - IIS 5
Security Checklist. Great doc for what you need to do to secure
IIS.

That's a good start. For hardware, have a look at the Cable/DSL
routers offered by NetGear and Linksys (I use a NetGear RT 314,
but I've heard good things about the Linksys models as well).
Make sure that the model you buy can do NAT (network address
translation) and packet filtering. Getting one with a web-based
admin interface would be a bonus (mine's telnet-based, and none
too intuitive, but it works)."

______

Abdel:

"Hi James, I know you do that everyday, but don't know how you
do to merge different tables from your DB.

My users connect to my application through a DB, such as yours.

My DB tables are linked together with id, Now when a user is
identified, I'd like to show him data from more than one table.

Is the best way to do this "merging tables ?"

Thanks again James"

Me:

Well, it's not merging, but to show info from two related
tables, use this type of SQL statement:

DBGetRecords ( 'SELECT Table1.id, Table1.a, Table2.b FROM
Table1 INNER JOIN Table2 ON Table1.id = Table2.id' );

This populates the recordset with the id and a columns from
Table1 and the b column from Table2. It matches up the two
tables by saying that they both have an id column which
matches.

Let's see how this works with a simple example:

Create Table1 with an "id" autonumber (i'm using Access of
course) and an "a" text column.

Enter the following data:

  1 james
  2 fred
  3 joe

Create Table2 with an "id" autonumber and a "b" text column,
and enter:

  1 shaw
  2 smith
  3 deleteme
  4 bloggs

Then delete the "deleteme" row (!)

Now when you run the query above you'll get the following
returned:

  1 james shaw
  2 fred smith

The "joe" and "bloggs" rows didn't have any matching entries
in the other table, so neither are shown.

______


This all started when I got yet another test newsletter from
someone using my code. I have to leave some email address in
the downloaded database, so I can always tell when someone
is testing.

I sent several emails to them asking them to remove my email
but all went unanswered, so instead I went to their CYA-based
web site to have a look around.

Here's the funny part - the DBadmin.asp page was still there
and the password had not been changed! If you're using my
code, ALWAYS change the password!

Anyway, it was easy then to edit their database and remove my
email address myself... =;-)

______

Chuck:

"Some guys and I have got into it recently regarding
server-side JavaScript. They claim it is impossible outside
of Netscape servers.  I showed them some examples of your
pages (on IIS), but they still don't see. All of the
documentation seems to support them. So, how do your pages
run on IIS?"

Me:

Hehehe. ASP can be written in many languages, even perl, but
VBScript and JScript (MS' identical version of JavaScript)
are the most common. So, *of course* it's possible to run
JavaScript server-side on IIS - I do not write *anything* in
VBScript.

If they don't believe you, download the entire site[1] and
let them inspect it!

[1] http://CoverYourASP.com/CYA.asp

______

Abdel:

"Is there any mean to get the first - day of the week - date
and the week number?"

Me:

All the objects and their methods are well documented on MSDN,
here are the Date object docs:

http://msdn.microsoft.com/scripting/jscript/doc/jsobjdate.htm

____________________________________________________________

            H A V E   I   H E L P E D   Y O U ?

          If I've helped you, help me help others!

            http://CoverYourASP.com/Donate.asp

         ===> now with new ways to say thanks! <===
____________________________________________________________

Please, join our aspcya list, especially if you're experienced
with the CoverYourASP site and code and would like to share
answering the questions. I will remove moderation from users
who I already know when they first post to the list, and any
others that show they won't stray off-topic. Your replies
will then go straight through without any delay.

In the meantime, while you're moderated, please bear with me
as your emails will be delayed until I approve them to the
list. It's all done this way to keep the quality of the list
high, which obviously benefits everyone.

Thanks Guys! Speak to you later.

Warmest Regards,

James Shaw

[email protected]

885 Woodstock Road, Suite 430, #108
Roswell, GA 30075-2247, U.S.A.

____________________________________________________________

                S U B S C R I P T I O N S

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

Featured sponsor
My favorite resources

CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?


New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!


See my source code
wherever you see this icon...

You can also download the entire site source code for FREE!


I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...


Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!