DWebPro Stand Alone Web Server
Getting Started with DWebPro
What is DWebPro?
System Requirements
DWebPro Architecture
Compatibility Issues
ASP.NET Compatibility
ColdFusion Compatibility
ASP Classic 3.0 Support
The aspisapi.ini Configuration File
The Server.NewMail Object
The Server.Registry Object
The Request.Upload Object
Where to Obtain Technical Assistance
Changes since DWebPro 5.2
Configuring DWebPro
Add-On Packages
DWebPro Configurator Tabs
Main
Splash Screens
Browser
Web Server
SMTP Server
Server Side Languages
ASP.NET Server
CGI
ISAPI
ColdFusion
Tomcat
Zope
Railo
JBoss
Databases
MySQL
Firebird
SQLite
PostgreSQL
HSQLDB
Microsoft Access
Microsoft SQL Server Compact Edition
Microsoft SQL Server 2000 Desktop Engine
Microsoft SQL Server 2005 Express Edition
Oracle XE
ODBC
External Software
Directories
Windows Requirements
Warnings
Exception Log
Shutdown
Additional Tools
MDAC
Flash Player
Windows Installer
Acrobat Reader
.NET Framework
Advanced Features
Auto Update
The deploy Folder
Advanced Topics
Application Program Interface (API)
Command Line Parameters
Internal Constants
Interactive Install Workflow
Additional Tools
DWebPro Browser Software
My IE Software (My Internet Explorer)
Starter Software
Advanced Tools
DWebPro Re-Brander Software
Microsoft SQL Server 2005 Compact Edition Manager
URL Rewrite Engine
Multilanguage Support
DWebPro Translator Software
Security Tools
DWebPro License Bundler Software
DWebPro Encoder Software
Trial Generation
DWebPro Trial Generator Software
DWebPro Serial Generator Software
PHP Extensions
The php_dwebpro Extension
The php_registry Extension
DWebPro Service
Frequently Asked Questions
General FAQs
Primary Web Server FAQs
Browser FAQs
ASP.NET FAQs
PHP and MySQL FAQs
ASP Classic 3.0 and Microsoft Access FAQs
Licensing FAQs
Purchasing FAQs
HOWTOs / Tutorials
How To Create Your CD/DVD
How To Read DWebPro Internal Constants From Code
How To Distribute a PHP/MySQL Web Site With DWebPro
How To Distribute ASP Classic 3.0/Microsoft Access Web Site With DWebPro
How To Use Microsoft Access Database On CD/DVD
How To Test a DWebPro Project Without Burning CDs/DVDs
Virtual CD-ROM Control Panel Setup
Create the ISO image
Activate the ISO image
How To Create An Install Package With DWebPro
How To Test Your Install Packages With The FREE License
How To Protect Your License From Stealing With The DWebPro License Bundler
How To Protect Your PHP and ASP Classic 3.0 source Code From Stealing With The DWebPro Encoder
How To Translate The DWebPro Interface
How To Personalize The HTTP Error Messages
How To Create A Trial Version Of Your Web Applications With DWebPro
How To ReBrand DWebPro With A DWebPro ReBrand License
How To Test Your mod_rewrite Directives With The Rewrite Engine Tester
License
DWebPro Licensing Model
Limitations of the Free License
DWebPro EULA
Copyright Notes

DWebPro Is The Best Stand Alone Web Server On The Market!!!

DWebPro Is The Best Stand Alone Web Server On The Market!!!

Partecipa al corso operativo "Come Vendere Con Successo il Tuo Software Su Internet" vendere-software-su-internet.it

Partecipa al corso operativo "Come Vendere Con Successo il Tuo Software Su Internet" vendere-software-su-internet.it

Partecipa al corso "Mastering Landing Pages" masteringlandingpages.com

Partecipa al corso "Mastering Landing Pages" masteringlandingpages.com

ASP Classic 3.0 and Microsoft Access FAQs

How can I protect my ASP Classic 3.0 source code from being stolen?

 

DWebPro includes the DWebPro Encoder Software, which is a PHP/ASP Classic 3.0 encoder that provides an entry level solution for source code protection.

 

How can I send email using ASP Classic 3.0?

 

The ASP Classic 3.0 support provided by DWebPro includes some features not available in Microsoft ASP, one of these feature is the Mail object.

The Server.NewMail() method returns an instance of Mail object (as CDONTS.NewMail does). This object can be used to send emails through the SMTP server specified in the ASP Classic 3.0 configuration file (refer to the ASP Classic 3.0 Support topic).

The differences between Server.NewMail() and CDONTS.NewMail are:

  • Value() behaves differently (see below)

  • AttachURL() behaves differently (see below)

  • Send() returns a value that specify the success of the email shipment

  • Body can be only a string

  • SetLocaleIDs are ignored

Below are some examples of how to use Server.NewMail:

  1. Send a plain text email without attachments.

    Dim Mail
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "This is the subject of the sample email"
    Mail.Body    = "This is the body of the sample email"
    Mail.Send
    Set Mail     = nothing
  2. Send an HTML email without attachments.
    Dim Mail
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "Test mail"
    Mail.Body    = "<html><body><strong>Hello World!</strong></body></html>"
    Mail.MailFormat = 0 ' MIME
    Mail.BodyFormat = 0 ' HTML
    Mail.Send
    Set Mail = nothing
  3. Send a plain text email with attachments.
    Dim Mail
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "This is the subject of the sample email"
    Mail.Body    = "This is the body of the sample email"
    Mail.AttachFile(Server.MapPath("images/dwebpro_box.gif"))
    Mail.MailFormat = 0 ' MIME
    Mail.Send
    Set Mail = nothing
  4. Send an HTML email with attachments.
    Dim Mail
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "Test mail"
    Mail.Body    = "<html><body><strong>Hello World!</strong></body></html>
    Mail.AttachFile(Server.MapPath("images/dwebpro_box.gif"))
    Mail.MailFormat = 0 ' MIME
    Mail.BodyFormat = 0 ' HTML
    Mail.Send
    Set Mail = nothing
  5. Send an HTML email with embedded attachments.
    Dim Mail
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "Test mail"
    Mail.Body    = "<html><body><img src='cid:embeddedpic'/>"
    Mail.Body    = Mail.Body & "<strong>Hello World!</strong></body></html>"
    Mail.AttachURL Server.MapPath("images/dwebpro_box.gif"), "EmbeddedPic"
    Mail.MailFormat = 0 ' MIME
    Mail.BodyFormat = 0 ' HTML
    Mail.Send
    Set Mail = nothing
  6. Usage of the Value method (different than CDONTS.NewMail).
    Dim Mail
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "This is the subject of the sample email"
    Mail.Body    = "This is the body of the sample email"
    Mail.Value("Organization", "Your Company")
    Mail.Send
    Set Mail = nothing
  7. Usage of Send() return value.
    Dim Mail
    Dim RetVal
    Set Mail     = Server.NewMail
    Mail.From    = "from@example.com"
    Mail.To      = "to@example.com"
    Mail.Subject = "This is the subject of the sample email"
    Mail.Body    = "This is the body of the sample email"
    
    RetVal = Mail.Send
    if (RetVal = 0) then
      Response.Write("Mail sent successfully!")
    elseif (RetVal = 1) then
      Response.Write("Socket error (check SMTP server connection)!")
    elseif (RetVal = 2) then
      Response.Write("Protocol error (check mail properties)!")
    else
      Response.Write("Unknown error !")
    end if
    
    Set Mail = nothing
        

Here are the Mail object properties and methods:

Write-only properties:

  • From: string;

  • To: string;

  • Bcc: string;

  • CC: string;

  • Importance: integer;

    • 0 = Low

    • 1 = Normal (default)

    • 2 = High

  • Subject: string;

  • Body: string;

  • ContentLocation: string;

  • ContentBase: string;

  • BodyFormat: integer;

    • 0 = HTML

    • 1 = Text (default)

  • MailFormat: integer;

    • 0 = MIME

    • 1 = Text (default)

Read-only property:

  • Version: string;

Methods:

  • procedure Value(Item, Value: string);

  • procedure AttachFile(Source: string; optional FileName: string; optional EncodingMethod: integer);

  • procedure AttachURL(source: string; optional cid: string; optional encodingmethod: integer);

  • function Send(From: string; optional To: string; optional Subject: string; optional Body: string; optional Importance: integer): integer;

 

Which connection string should I have to use for connecting to a Microsoft Access database?

 

The connection string to use depends on the access mode you need. If you need to read and write database content, you have to configure DWebPro to copy the database file on the user's file system and create a connection string that points to that path.

For instance, if you want to establish a read/write connection to the Northwind.mdb database, perform the following steps:

  1. Copy the database to a dedicated folder in the deploy directory (for example, deploy\database).

  2. Edit the MsAccess section of the http.ini file as follows:

    [MsAccess]
    DestinationDir=##DWEBPRO_TEMP##\database
    DataDir=##DWEBPRO_PATH##\database
    CopyDataToHardDisk=1

    The above configuration tells DWebPro to copy the data (CopyDataToHardDisk=1) from the ##DWEBPRO_PATH##\database folder into the ##DWEBPRO_TEMP##\database folder.

  3. Edit your connection string as follows (VBScript sample code):

    <% 
    DIM ConnectionString
    ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
          "DBQ=" & Request.ServerVariables("DWEBPRO_TEMP") & _
          "\database\Northwind.mdb;" & _
          "UID=admin;PWD=;"
    %>  
    or as follows (VBScript sample code):
    <% 
    DIM ConnectionString
    ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
          "DBQ=" & Request.ServerVariables("DWEBPRO_MSACCESS_DATADIR") & _
          "Northwind.mdb;" & _
          "UID=admin;PWD=;"
    %>  
    Refer to the DWebPro Internal Constants topic and to the How to Read DWebPro Internal Constants from Code how-to for additional information on paths.

If you only need to read the database content, you can leave the database file on the CD/DVD and add two additional parameters to the connection string: ReadOnly=1 and Exclusive=1.

For instance, if you want to establish a read-only connection to the Northwind.mdb database, perform the following steps:

  1. Copy the database to a dedicated folder in the deploy directory (for example, deploy\database).

  2. Edit your connection string as follows (VBScript sample code):

    <% 
    DIM ConnectionString
    ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
          "DBQ=" & Request.ServerVariables("DWEBPRO_PATH") & _
          "\database\Northwind.mdb;" & _
          "UID=admin;PWD=;ReadOnly=1;Exclusive=1;"
    %>
 

Can I make the ASP Classic 3.0 engine execute .HTM and .HTML web pages ?

 

Of course you can! Open the http.ini file and search for the ASP Classic 3.0 reference in the ISAPI section. You will find something like the following:

[ISAPI0]
Path=##DWEBPRO_PATH##\engine\aspclassic\aspisapi.dll
Extensions=.asp|.asa

The above configurations tells DWebPro to make the ASP Classic 3.0 engine execute the files specified in the Extensions field (.asp|.asa).

To make it execute the .htm and .html files you have only to add them th the Extensions field.

[ISAPI0]
Path=##DWEBPRO_PATH##\engine\aspclassic\aspisapi.dll
Extensions=.asp|.asa|.htm|.html

Refer to the ISAPI and ASP Classic 3.0 Support topics for more information about ASP Classic 3.0 support and configuration.

 

How can I know when the web application is running under DWebPro (i.e. for conditional configuration)?

 

DWebPro sets the SERVER_SOFTWARE server variable with the "DWebPro" strings. You can use a code like the following to identify when you web application is running under DWebPro or another web server.

<%
If (Request.ServerVariables("SERVER_SOFTWARE") = "DWebPro") then
    Response.Write("This application is running under DWebPro!")
Else
    Response.Write("This application is <b>not running</b> under DWebPro!")
End If
%>

This feature is useful if you want to use the same code base for your online and CD based web application. For instance you can use a code like the following for your configuration file:

<%
If (Request.ServerVariables("SERVER_SOFTWARE") = "DWebPro") then
    // Insert here the DWebPro configuration
Else
    // Insert here the IIS configuration 
End If
%>

DWebPro Is The Best Stand Alone Web Server On The Market!!!

DWebPro Is The Best Stand Alone Web Server On The Market!!!

Partecipa al corso operativo "Come Vendere Con Successo il Tuo Software Su Internet" vendere-software-su-internet.it

Partecipa al corso operativo "Come Vendere Con Successo il Tuo Software Su Internet" vendere-software-su-internet.it

Partecipa al corso "Mastering Landing Pages" masteringlandingpages.com

Partecipa al corso "Mastering Landing Pages" masteringlandingpages.com
Prev Page Prev Page