...

View Full Version : ASP Beginner: Tutorials?



The Reverend
03-30-2007, 01:09 AM
I'm just starting to learn ASP, I already know PHP and Java fairly well, so I am already familiar with basic programming concepts. I used the W3 schools tutorial as a starting point, but what other tutorials are good for a beginner who doesn't need programming 101 explained?

Also, what's the difference between ASP and ASP.NET?

I know these questions are fairly simple, but I'd appreciate any help that can be provided.

nikkiH
03-30-2007, 02:58 AM
ASP is old and crappy and few people use it on purpose any more. ASP.NET is the new ASP, with tons of improvements.

4 Guys From Rolla rock for both.
http://www.4guysfromrolla.com/

MSDN (Microsoft) has tons of tutorials for .NET.
http://msdn2.microsoft.com/en-us/asp.net/default.aspx
http://asp.net/

Honestly, unless you really need ASP for legacy apps, there is little reason to learn it. .NET is utterly and completely different. Plus, as a PHP coder, you are bound to prefer C# to VB, and Classic ASP only supports VBScript (jscript doesn't count, no one used it and there are very few examples, much less tutorials, on it).

The Reverend
03-30-2007, 04:03 AM
Thanks for your reply, I've only started with this stuff in the last few days and it's blowing my mind with what you can do. Why is ASP.net less popular than PHP, or is it? How is the server load vs. with PHP and how available is hosting and so forth?

SSJ
03-30-2007, 01:08 PM
http://www.oracle.com/technology/pub/columns/hull_php2.html

Daemonspyre
03-30-2007, 03:04 PM
I disagree with you, nikkiH...

I find that .NET is much slower, more server-intensive, and, although has some cool techniques in it, is not that much more useful than Classic ASP.

I can do as much in ASP as I can in .NET, including AJAX (which was touted as not compatible with ASP).

It's all in how you use the functionality and for what purposes.

Just my 0.02...

nikkiH
03-30-2007, 05:47 PM
Well, I do code intranet web applications, so I might be a bit biased towards enterprise level tools. I have Visual Studio and ajax.net and a ton of other tools (both official and unofficial), plus a really nice web server. :D

PHP is more popular because it's free, among other things. .NET is expensive to develop well (you really do need Studio to leverage the power), hosts cost more, and it is more server intensive. PHP has a huge community and lots of free and open source apps, so you rarely have to completely re-invent the wheel.

However, I would still never choose Classic ASP. If I want an app that is not .NET, non-enterprise, I'd choose, well, PHP. ;)

nikkiH
03-30-2007, 05:53 PM
And again, this thing won't let me edit. LOL

Consider this the edit. :D

Well, I do code intranet web applications, so I might be a bit biased towards enterprise level tools. I have Visual Studio and ajax.net and a ton of other tools (both official and unofficial), plus a really nice web server. :D
I cannot do these things in Classic ASP (at least not without hassle or 3rd party tools):
* Multiple file uploads
* Automatic form validation
* SQL parameters (not dynamically generated sql, which is open to injection attacks)
* pretty much anything I want to do is easier and faster, since 99% of what I do deals with database actions, either query, insert, update, or delete

PHP is more popular because it's free, among other things. .NET is expensive to develop well (you really do need Studio to leverage the power), hosts cost more, and it is more server intensive. PHP has a huge community and lots of free and open source apps, so you rarely have to completely re-invent the wheel.

However, I would still never choose Classic ASP. If I want an app that is not .NET, non-enterprise, I'd choose, well, PHP. ;)

Daemonspyre
04-02-2007, 02:49 PM
Since this is NOT a flame war, simply a discussion...

I also code some pretty intensive Classic ASP web applications, which do include AJAX, web-based WYSIWYG text editors, CMS, etc.

They are all encrypted and secured both on the web server and the database server using 256 AES encryption (http://www.truecrypt.org).

I can do multiple file uploads using ASP (minus the 3rd party stuff), I have coded my own Auto-form validation (NO FP-bots), and do have SQL-Injection safe dynamic SQL syntax based on forms and search fields.

The web server that I have is a Quad Xeon, so power is not an issue. I just find that Classic ASP has the same tools that .NET does IF YOU KNOW HOW TO MANIPULATE THE SYSTEM...

Now, that being said ---
Does .NET provide a better platform for some systems and groups - YES.
Does .NET allow for more robust applications - YES.
Does .NET work for everyone - NO.

PHP won't work for me in this situation either, as I am not a good PHP coder.

Just another $0.02 from another coding perspective...

nikkiH
04-02-2007, 04:26 PM
Interesting.
Perhaps .NET is simply better out of the box than Classic ASP. Meaning both have good power and whatnot, but you have to do more hand-coding with classic.

Out of curiosity, how do you handle mail with classic? I'm stuck with classic for an older app I maintain, and I have tried both cdonts and cdosys, and I still am not getting errors when mail addresses bounce, yet if even one is invalid, the whole darn mail fails and nothing is sent.

nexosis
04-02-2007, 04:38 PM
http://tizag.com
http://w3schools.com

Daemonspyre
04-02-2007, 04:55 PM
CDONTS and CDOSYS are both NT 4.0 and ASP2.0 based, both are long "gone".

I use a free emailer called ASPEmail. You can download it from http://www.aspemail.com. Supports Reply-To, Security (inc. SMTP-AUTH), CC, BCC, Encryption (but only for the paid version), Subject, Body, HTML / Text, etc.

Be happy to help you configure if you need it, but it's pretty easy.

Lastly, I learned how to use computers in DOS/UNIX, so I am used to CLIs and hand-coding everything. I still code HTML by hand. Only use FP for the color-coding.

HTH!

nikkiH
04-02-2007, 05:39 PM
Thanks for the tip!
What does it do if one address in the list is invalid? Return false, but still send to valid addresses, or throw an error and not send at all?

Daemonspyre
04-02-2007, 05:48 PM
If the address is invalid, it will throw a 550 error, on which you can tell it to either On Error Resume Next OR tell it to record the error somewhere and move on.

It's a simple DLL that gets loaded into the IIS of the box, then it's up to you to add the methods as necessary.

Depending on the reason for the mailer, I use 2 loops.

Loop 1) Pull email address. IF IsNull(email) = false THEN... Continue on to Loop 2. ELSE Movenext

Loop 2) If Valid Email, send, ELSE ON ERROR RESUME NEXT; EXIT FOR. Exits the second loop and goes to the next Email address.

But, I am also a data NaughtZ and I routinely go through and doublecheck all my entries. My forms also have an email check routine that makes sure that you are using a valid top-level domain before it lets you submit the form.

HTH!

nikkiH
04-02-2007, 06:49 PM
A quick little test it actually sent the mail to the valid address and sent an Undeliverable to the From address. Which is PERFECT.
Thanks so much for the link!

Daemonspyre
04-02-2007, 07:02 PM
Glad I could help!

nikkiH
04-02-2007, 09:49 PM
I did notice that if both from and to are invalid, Send returns true and throws no error, yet no one gets the bounce.
I tried setting MailFrom to a valid addy, but still got no Undelivered error.

One of the automatically added To addresses is our help desk, though, so at least we'll see the message, which was our main concern. (the mail in question is supposed to automagically open a ticket in our tracking system and set the Requestor from the From address)
It also appears that the bounce will go to the valid address in the To if there is one, so at least someone will see it.

If you know a way to check on this condition, that'd be great, but we're still okay for now. Thanks again.

Daemonspyre
04-02-2007, 11:27 PM
Try adding the Mail.AddReplyTo to your messages. That way, if it does bounce, you should get a message to that address at all times.

Please note that this doesn't always work due to how Mail Servers interpret Reply-To headers (vacation rules and auto-responders don't use the Reply-To, they use the FROM).

You can also try to force it to throw an error, catch it, then do an If Err.Number = method.

HTH!

areed
04-03-2007, 03:09 PM
I just found the ASP.net account on my computer and freaked out! When I went to shut down my computer Sunday night it said there was another user using my computer - I had a heart attack. I immediately deleted that account.
Can someone please explain in simple terms what ASP.net is, what it does and do I need it.

Thank you

Areed:confused:

Daemonspyre
04-03-2007, 03:33 PM
Areed,

Please post a new thread for this topic.

But, to answer your question, ASP.NET is a coding language, derived from the aggregation of ASP and .NET, used to build robust and secure web applications.

The ASP.NET account on your Windows XP box is supposed to be there, as it is a LOCAL NETWORK / SYSTEM account used to run the .NET platform on your computer.

As to others being logged into your computer, were you sharing any files? If so, please look there first. Otherwise, please start a new thread.

areed
04-03-2007, 03:41 PM
Thank you. I still have some questions so will start a new thread.
Areed

degsy
04-18-2007, 03:47 PM
Just on the mail issue. I find IIS Virtual SMTP Server extremely limited.

I prefer using third-party mail server where you have more control
I'm using MailEnable at the moment.


The same goes for IIS FTP. Currently using Filezilla Server.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum