Why do I blog? Because when I spend a large amount of time troubleshooting, the next time the problem comes around (like getting ColdFusion 7 to connect to a MySQL datasource), I just have to read the post.
Category: Programming
Coding
Anyone want to do a group project?
I’ve never done an open source project before. Here’s my proposal. We write a WordPress plugin that helps create a blacklist of known content thieving IPs. When an IP from the blacklist requests the RSS feed or direct link from the WordPress blog, we deliver an anti-theft of content notice instead of the actual content. The plugin will have the ability to deliver a custom message allowing people the personal choice of making the payload as obscene or marketable as they like. I have some thoughts on implementation since the splog delivering the content might have a different IP than the scavenger. For instance, the plug could alter the comment interface to include a check to mark a comment or trackback as potential content theft. The plugin would then have to examine the server logs to try to draw a correlation between when the real content was posted, the IPs that requested the RSS or post, and the time the stolen content was posted. With large samplings to a single database I think we could be very effective at blocking the thieves. Now, what’s the abuse potential here?
After getting this working on WordPress, I think we could extend it to other platforms.
Update: Looks like Owen Winkler (Antileech) has already written this! Kudos! Lorelle gives an overview and also recommends Digital Fingerprint Detecting Content Theft WordPress Plugin.
I do not like Flash sites
As a developer, I steer clients away from relying upon Flash for anything on their site. Adobe would love Flash to be the medium of choice for everyone but the truth is Flash doesn’t bode well for deep linking, navigation is often slow and clumsy, and it is not as portable as straight HTML to mobile devices and other non-traditional browsers. Granted, Opera mini, other tools, and Adobe are trying to make Flash more readily usable on all platforms.
I do like Flash! I think it should be used to enhance the overall user experience on a website. Perhaps certain navigation elements could be done in Flash but if the browser cannot detect the Flash plugin then it shows a regular HTML navigation. Keep it small and light. Now, all that aside, the Sony Bravia Flash site is cool! And just when I was getting comfortable with the 2D web, someone had to go and add depth.
Ah! I put my finger on it as I was commenting at ProfessorFalken:
It adds the z-axis to browsing to bring us closer to that 3 dimensional hokeyness we see in computer movies like Hackers and Johnny Mnemonic. [Source]
Programmer Tip of the Day
It doesn’t always have to be elegant. It just has to work!
Remember, we create function before art.
When coders dream
Apparently I wrote the solution to this problem in my web application while I slept. It certainly is not in the code and I really remember putting it in the code. It was some slick programming too!
Learn to Speak Programmer
Phrases to add to your vernacular:
"Oops"
and
"Hehe. That was stupid."
What am I doing to my brain?
The mental exercise of jumping from one project to another at a rapid pace with breakneck deadlines is like making a bootleggers turn at interstate speeds particularly when the environment of each project changes slightly or even drastically such as CF with MS SQL to CF with MySQL to ASP with MS Access. I’m sure this either good for me or the seed for a tumor.
Why I could never work in an office again #6243
I am most productive when burning some Sandlewood.
Consultants – Warranties
Every now and then you get a phone call that goes something like this "That code you wrote for us a year (or more) ago doesn’t work anymore. We were thinking of doing more work with you but if we can’t get this fixed we may have to go with someone else." The proper answer is "No problem. That will be $x per hour to troubleshoot since we do not currently have a contract." The real answer is usually "ok. I’ll look into that real quick." because a) you know darn well the real answer will send them packing b) you are a nice guy and like them and c) you haven’t yet reached a level of financial stability to be blowing off customers (note: you’ll fix c if you use the real answer more often).
When your code doesn’t change and after a length of time it suddenly doesn’t work, the problem is almost always with the web host or the client. Sometimes they have discovered a very well hidden bug but rarely. In my case, the permissions on the directory which the application used to upload files had changed to not allow for uploading. How do permissions magically change? They don’t.
Cool! AIR meets Analytics
Programmers, particularly those Adobe fans, know about AIR apps. People who deal with websites know about Google Analytics. Now AIR meets Analytics and you can get in on the beta!
Today’s focus: ColdFusion! (with a side of Access)
Today I will use ColdFusion for PDF manipulation of data received by fax and saved as gifs or jpegs. I will also generate lots of reprots with ColdFusion, I will make data dance on the screen, and I will get MS Access to produce a printed book from its 14 tables of data.
This evening I’ll take the boys to their scout meeting.
Consistency, who needs it!
So I work in ColdFusion a lot. I also work in PHP a lot. Just did a round of work on ASP. Working on web applications involves integral knowledge of Javascript, CSS, HTML, and a variety of other buzz words like Flex, AIR, AJAX, and so forth. It also means decent familiarity with databases such as MS SQL, MySQL, and MS Access and others.
Tonight I work in the one I dread the most…MS Access! I wonder what it would be like to go to work and do the same thing day in and day out.
The ASP Butt Kicking Saga
Hurdle 2 is now complete! The host’s local SMTP server is not configured correctly. The website is hosting its pop/smtp email else where. Using Method 3 of Sending email using CDOSYS ( THE REAL DEAL ) I was able to finally get email to send!
Method 3 ( Using remote mail server )
<% Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.yoursite.com" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="somemail@yourserver.com" 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="yourpassword" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = "someone@someone.net" ObjSendMail.Subject = "this is the subject" ObjSendMail.From = "someone@someone.net" ' we are sending a text email.. simply switch the comments around to send an html email instead 'ObjSendMail.HTMLBody = "this is the body" ObjSendMail.TextBody = "this is the body" ObjSendMail.Send Set ObjSendMail = Nothing %>
In addition to what you see here there are plenty of properties you can add to these examples.
Here are a few examples.Carbon Copy
ObjSendMail.CC = “someone@someone.net”Blind Carbon Copy
ObjSendMail.BCC = “someone@someone.net”Send Attachment (we hard code it here, but you could specify the file path using Server.Mappath as well)
ObjSendMail.AddAttachment “c:\myweb\somefile.jpg”and a ton of other things you can do…
[Source]
Pages I found useful during this hurdle:
- CDOSYS or CDONTS, Which Will It Be?
- Send via ASP Page w CDONTS – Mail Stuck In SMTP Queue – Please help!
- Localhost mail stuck in QUEUE
- Mail Stuck in Queue Folder – IIS SMTP Virtual Server – Windows XP Service Pack 2 This one advised adding two crlf’s to the end of email.
See also Microsoft’s CDOSYS Documentation.
The final hurdle is rewriting their document management system. Presently, they have an admin piece that uploads documents to a single directory. The documents are then accessible to their customers. They want the ability to classify those documents. The approach will be to allow the documents to live in subdirectories representing the categories. This should be interesting.
Yesterday’s Butt Kicking Continues
Yesterday’s morning R&D centered around trouble shooting an SMTP problem with a Windows2003 server and ASP. Basically, I don’t get the error on my development server, which is still a Windows2000 machine. That means it could be code or server setup. The problem manifests itself when an attempt is made to send an email after a form is submitted.
CDO.Message.1 error ‘80040220’
The “SendUsing” configuration value is invalid.
This error message is all over Google (see also) (remember to use Blingo – aff link!).
I solve this in the next 2 hours!
Update: Why does Google continue to index www.experts-exchange.com?! Never click anything that is a link to www.experts-exchange.com! They obviously understand SEO really well.
Update: Troubleshooting thus far.
- Contacted the web host and explained that I think the server is not configured correct since emailing through telnet seemed to fail (but I might have done something wrong). Tech support explained that although they host the website that another company hosts the email. Excuse me? And that has exactly what to do with sending an email from asp through localhost? Here’s another testing through telnet instructional.
- Wow! SMTPDiag is fantastic. I’ve used it before but sort of put it out of my mind until now. It returns "failed to connect to the domain controller Error: ‘8007054b"
- How to test outbound mail flow with a file in the Pickup folder
- Initially looked like ColdFusion could send from the domain that ASP could not then I realized someone has changed cfmail to use an external mail server. Wonder how I would do that with ASP.
- After reading "SendUsing" configuration value is invalid (80040220), and access privilege problems caused by Exchange 2000 SP3, and how to test the SMTP service, and Troubleshooting email, the telnet way, and Troubleshooting IIS SMTP, and Testing email using RFC-822 and the pickup folder, I finally returned to reading all the comments in CDOSYS or CDONTS, Which Will It Be? to discover an astute comment by Scott Forsyth that this is indeed a permissions error and fixed by searching google for metaacl.vbs to discover these two technotes: ACLs and using MetaACL for metabase ACL permission changes (for understanding) and The MetaAcl tool for modifying metabase permissions on the IIS Admin Objects is available (for the vbs packaged within a self-extracting archive)
Title: The “SendUsing” configuration value is invalid in Windows 2003
Name: Scott Forsyth
Date: 3/27/2006 10:10:04 AM
Comment:
Hi Monde,On Windows Server 2003, if you don’t specify the default smtp server, it needs to obtain that from the IIS metabase. That isn’t allowed by default in IIS6, but you can add it with metaacl.vbs. Google and download a copy of metaacl.vbs and the run the following:
cscript metaacl.vbs “IIS://Localhost/smtpsvc” IIS_WPG RE
cscript metaacl.vbs “IIS://Localhost/smtpsvc/1” IIS_WPG REThis will give the IIS_WPG group read permissions to the smtpsrv node so that you’ll be able to obtain the default SMTP server without specifically setting it in code. This will often resolve the error that you have run into.
[Source]
Now, all of that said, only hurdle one has been jumped. My error message of "The "SendUsing" configuration value is invalid." is gone but mail is getting stuck in //Inetpub/mailroot/Queue. At least it is not going to the Badmail folder. Brief break then onto hurdle two.
Dear Technical Writers
If you are writing a reference manual on a programming language, please, I beg you, include "Hello World" in the index!