Wednesday, March 18, 2009

Error '80040211' When Sending Email in ASP

All this while, the web server used to host a web application that sends out email when a request is submitted suddenly couldn't send email anymore.
Error returned was this weird figure: Error '80040211'.

Seek my best buddy help: Google and found this link:
http://forums.aspfree.com/asp-development-5/error-80040211t-96396.html

Based on the forum, what that guy did is basically change the 'sendusing' fields from 2 to 1.
I tried and the trick works. ^_^

And from the explanation from MSDN
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/bb2a4e60-080f-49bf-be71-e2a7e52ce5ad.asp

cdoSendUsingPickup (value 1)
Send message using the local SMTP service pickup directory.

cdoSendUsingPort (value 2)
Send the message using the network (SMTP over the network).


Couldn't convince myself why this happens since my web server is over the network, but it works. Let's put this on for now, while I'm busying with another project at the moment.

Wednesday, March 11, 2009

ERROR: Object reference not set to an instance of an object

Problem occurs after the reinstallation of IIS in the web server (since out of a sudden --> might be due to a patch, the IIS is corrupted).

Accessing ASP page works fine in the localhost, but gives this error when accessing .Net page
"Object reference not set to an instance of an object".

Googled the web and found few links that teach on how to solve:

1. Support from Microsoft: http://support.microsoft.com/kb/810098
3. Re-registering aspnet_regiis.exe -i: http://dev.communityserver.com/forums/p/474748/531732.aspx

Item #1 and #2 didn't fix my problem, but the #3 did.
Basically, to prevent this error, you need to install IIS before install .Net Framework. If you did the reverse way, the .Net framework somehow are not registered in IIS. Therefore, you need to run the command again "aspnet_regiis.exe -i" to install it.

Screenshot of running the command in cmd prompt: