CDONTS uses the NewMail object to create and send email. This method is incompatible with Windows shared hosting websites running IIS 7. The following ASP code sample demonstrates how to use CDONTS to create and send email:<%
Dim MyBody
Dim MyCDONTSMail
Set MyCDONTSMail = CreateObject(“CDONTS.NewMail”)
MyCDONTSMail.From= “sender@coolexample.com”
MyCDONTSMail.To= “recipient@coolexample.com”
MyCDONTSMail.Subject=”Subject”
MyBody = “Body”
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
%>
ASP.NET starter kits can be downloaded from the ASP.NET website.
The following instructions use the ASP Time Tracker starter kit as an example. However, you can use this upload procedure for any starter kit that uses a SQL database (running from a local MDF file or a standalone server). The directions assume the following:You have [...]
Our Windows hosting supports ASP.NET application DLLs only. Further, DLLs that require registration with IIS are disallowed. DLLs must be uploaded to a bin directory within an application root on your hosting account.
For more information on setting up a hosting account custom directory, see the following articles:
Creating Directories on Your Windows Hosting Account.Customizing IIS Settings [...]
Using the Hosting Control Center, you can create, edit, and customize anonymous access permissions for directories and subdirectories on your website.To Create a Directory on Your Windows Hosting AccountLog in to your Account Manager.
In the My Products section, select Hosting.
Next to the hosting account you want to modify, click Manage Account.
In the Content section [...]
Your account’s Hosting Control Center displays your absolute path. For more information, see How do I find my absolute hosting path?.You canalso use ASP/ASP.NET to find your absolute path. Within ASP/ASP.NET, the function Server.MapPath returns the full path to your hosting account. If you create a directory called “subdir,” you could return the path to [...]
This is an example of a Cdonts script that works with our ASP hosting plan. This script has an auto-redirection at the end of it.
NOTE: This script will not work on Windows® hosting plans running IIS 7.
Modify the items in italics below to match your particular settings.<%
from = request.form(“from“)
body = request.form(“body“)
subject = request.form(“subject“)
%>
<%
Dim objMail
Set objMail [...]
Below is a list of objects supported on our Windows ASP and ASP.NET 1.1 shared hosting servers. These objects are not supported in our ASP.NET 2.0/3.0/3.5 environment, due to Medium Trust Restrictions. See What Is Medium Trust Level and How Does It Affect My Hosting Account? for more information. Windows ASP and ASP.NET [...]
Yes, we have enabled parent paths on your Windows shared hosting account.
Parent Pathing allows you to access resources from a file-relative approach. You can “address up” a directory level and access those resources.
Our form mailer sends mail at the following rates:ASP – every 10 minutes
CGI – every 15 minutes
PHP gdform.php – 15 minutes
PHP webformmailer.php – every 15 minutes (default) or as specified
Use the following relay server in your ASP CDONTS code:
relay-hosting.secureserver.net
You do not need to provide a user name and password for this relay server.
Two form mailers are included with new Windows shared hosting accounts: webformmailer.asp and gdform.php. To use a form mailer, create a Web form in HTML that links to one of our scripts and upload it to your hosting account.
NOTE: Do not use test@test.com to test your form mailer.
WARNING: The gdform.asp and gdform.php files cannot be [...]
NOTE: This article applies only to Windows Shared Hosting accounts.
In order to use our ASP form-mailer, you must specify an email address where you want the contents of your form sent to.
To Specify the Email Address for the Form-MailerLog in to your Account Manager.
In the My Products section, select Hosting.
Next to the hosting account you [...]
This example describes using ASP/ADO to connect to a Microsoft SQL Server Database.
<%
‘Sample Database Connection Syntax for ASP and SQL Server.
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = “whsql01.mesa1.secureserver.net”
db_name = “your_dbname”
db_username = “your_dbusername”
db_userpassword = “your_dbpassword”
fieldname = “your_field”
tablename = “your_table”
connectstr = “Driver={SQL Server};SERVER=” & db_server & “;DATABASE=” & db_name & “;UID=” & db_username & [...]
This example describes using ASP/ADO to connect to a MySQL Database.
Replace values beginning with your_ with your databases information.
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = “mysql.secureserver.net”
db_name = “your_dbusername”
db_username = “your_dbusername”
db_userpassword = “your_dbpassword”
fieldname = “your_field”
tablename = “your_table”
connectstr = “Driver={MySQL ODBC 3.51 Driver};SERVER=” & db_server & “;DATABASE=” & db_name & “;UID=” & db_username & [...]
This article describes ASP and server-side technologies and walks you through creating your first ASP pages. This article assumes that you are already comfortable with HTML and that you are interested in learning more about other Web technologies. You may download a PDF version to your computer or view the guide below.
NOTE: The PDF format [...]