Windows Services Frequently Asked Questions (FAQ): Copyright UplinkEarthhosting com 2008 V1.5
Table of Contents Introduction to the Uplink Earth Hybrid System... 5 Windows Services on the Uplink Earth Platform... 5 Uplink Earth's Hybrid System... 5 Differences between Windows-only hosting and the Hybrid System... 5 Database Support on Uplink Earth's Platform... 6 DSNs and conventions... 6 Functional Components... 6 Microsoft Access 2000/02/03... 6 Why is MS Access 2000/02 software only functional and not optimized on your architecture?... 6 ASP/Cold Fusion + MS Access... 7 Why are ASP/Cold Fusion + MS Access only functional and not optimized on your architecture?... 7 ASP.NET AJAX... 7 Components Not Recommended MS-Access 1997... 7 Why is MS-Access 1997 not recommended on your architecture?... 7 FrontPage + MS Access... 7 Not Functional... 8 Can I register an ActiveX/dll or CFX/dll?... 8 MSSQL DTS... 8 Components and tags:... 8 ASP.NET... 10 Some new features in ASP.NET 2.0:... 10 ASP.NET CODEBEHIND and Precompiled DLL... 10 Coding Considerations:... 11 Why are my changes not showing up on my site?... 11 Before uploading:... 11 Security and performance:... 11 ASP.NET Supported File... 12 Extensions not directly accessible through browser:... 12 ColdFusion... 12 Creates a powerful and compelling user experience:... 12 ColdFusion MX 7... 13 2
ColdFusion 5... 13 About ColdFusion 5... 13 ColdFusion Applications... 13 ColdFusion Scripting Language... 13 Cold Fusion Tags & Functions:... 13 Restricted Tags and functions:... 14 Custom Cold Fusion Tags... 14 MS Access Warning Messages... 14 Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.... 14 Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x4d4 Thread 0x748 DBC 0x84dbc84 Jet'... 14 Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.... 14 Microsoft OLE DB Provider for ODBC Drivers error \'80040e4d\' [Microsoft][ODBC Microsoft Access Driver] Too many client tasks. /index.asp, line 134... 15 Microsoft JET Database Engine error '80004005' Not a valid file name.... 15 Access DB Connections from multiple domains... 15 Why are Connections from multiple domains to one specific database not functional on your system?... 15 General Questions... 15 How do I connect to my MSSQL DB?... 15 MSSQL 2005:... 19 Why does my site perform better on my local machine?... 20 Possible Causes for Broken Sites... 20 Access Database performance issues... 20 My Access Database site is performing poorly on the clustered architecture. What are the possible reasons/solutions?... 20 Payment Gateways... 21 Which Payment Gateways are installed on the Hybrid Platform?... 21 SSL... 21 How are SSL considerations handled on the Hybrid?... 21 Installed Software:... 22 3
Coding Examples... 23 ASP... 23 (ASP) DSN connection for MS Access... 23 (ASP) DSN connection for MS SQL... 23 (ASP) DSN connection for MySQL... 23 (ASP) DSNless Connection for MS Access... 23 (ASP) DSNless connection for MS SQL... 23 (ASP) DSNless connection for MySQL... 23 (ASP) Defining Paths... 23 ColdFusion... 23 (ColdFusion) DSN connection for MS Access... 23 (ColdFusion) DSN connection for MS SQL... 24 ColdFusion) DSN connection for MySQL... 24 (ColdFusion) DSNless Connection for MS Access... 24 (ColdFusion) DSNless connection for MS SQL... 24 (ColdFusion) DSNless connection for MySQL... 25 ASP.NET... 25 (ASP.NET) DSN connection for MS Access... 25 (ASP.NET) DSN connection for MS SQL... 26 (ASP.NET) DSN connection for MySQL... 26 (ASP.NET) DSNless Connection for MS Access... 27 (ASP.NET) DSNless connection for MS SQL... 27 (ASP.NET) DSNless connection for MySQL using ODBC:... 27 (ASP.NET) DSNless connection for MySQL using MySql.Data.MySqlClient :... 28 MySql.Data.dll needs to be copied to the application/binfolder... 28 Sample web.config file:... 29 Errors and warnings:... 29 4
Introduction to the Uplink Earth Hybrid System Windows Services on the Uplink Earth Platform Uplink Earth's Microsoft Windows hybrid services provide ASP, ColdFusion, Access and MSSQL services targeted at the needs of SME's, all at a price point considerably lower than a dedicated Windows solution. With the ability to use both UNIX and Windows technologies in unison, the Hybrid solution offers a less complicated, more robust, lower cost method for users to employ the most popular Windows hosting features. Uplink Earth's Hybrid System Once a customer has enabled Windows services, the hosting system uses file extensions to determine when to send Windows-specific requests to IIS servers.1 This is made possible by Uplink Earth's redundant, distributed architecture. Site content is housed on Network Filers instead of individual web servers; along with removing individual web servers as a point of failure, this allows content for one site to be served through multiple machines. With this system a user can mix Unix and Windows content in the same site. Differences between Windows-only hosting and the Hybrid System Permissions: The entire Uplink Earth system uses Unix-based permissions, even for Windows content. Stability: Superior redundancy provided by distributed, clustered architecture Case Sensitivity: The Uplink Earth System is case-sensitive; this can be bypassed using an.htaccess file placed in a user's public directory (syntax =CaseInsensitive ON) Flexibility: Designers can mix Unix and Windows functionality in the same hosting environment Secure: Uplink Earth's hybrid system uses a streamlined Unix security model. Front Page: The Hybrid Platform handles Front Page extensions on Unix servers. The Uplink Earth system handles most FrontPage functionality (e.g. forms, themes); However, direct database integration via the FrontPage interface is currently non functional. DSNs (Data Source Names): Up to two DSNs can be employed. They must follow our prefix_domain_com naming convention. Paths: Local system paths (i.e. C:\My Documents) cannot be used since site content is not stored locally Supported Language platforms: HTML, PHP, CGI and PERL are parsed by the UNIX portion of the hybrid. 1 Nonspecific requests (such as HTML) will be served by Unix servers;.asp and.cfm requests will be served by Windows 2003 Server. 5
Database Support on Uplink Earth's Platform The Windows database types supported on the Hybrid platform are Access and MSSQL DSNs and conventions Hybrid system customers can integrate their databases into their websites using either of the following methods: DSN connection method: A DSN is used by applications to request a connection to a system ODBC data source. It specifies the computer name and (optionally) the database that the DSN maps to. To create a DSN for MS Access databases, the.mdb file must exist in the /databases directory of the end-users file structure. DSN-less connection method: Also known as the OLE DB connection method. This method allows greater flexibility for end-users; the database does not have to be located in a specific directory. The database can be located anywhere within a client's directory structure, and can be accessed in their code as long as the proper path is specified. Functional Components Microsoft Access 2000/02/03 Why is MS Access 2000/02 software only functional and not optimized on your architecture? Microsoft Access was designed as a single-user desktop database, and not for server use. MS Access 2000/02/03 is functional on our system and suits web applications well when dealing with small- to medium-size business websites, which deal with a reasonably low level of traffic; however, the functional design limitations of MS Access itself (being a desktop program as opposed to a server program) increases the likelihood of poor performance when large numbers of users make simultaneous calls to the Access database. For these reasons, it is recommended that MS Access be used solely for development purposes and not for production. Recommended Alternative: Although MS-Access 2000/02/03 is functional and works reasonably well on our system in most situations, you may benefit from upgrading to a true multi-user database platform such as MS SQL or MySQL. We have found that sporadic performance issues occur when traffic-intensive sites run on Microsoft Jet and IIS. We have ensured that our system is using the latest Microsoft Jet Components and Updates. We recommend that the native Jet OLE DB provider be used in place of the Access ODBC Driver. Excerpt from Readme.txt (IIS) The following article outlines Microsoft's recommendations to implement an SQL Server Database for use under IIS to accommodate for web, commerce, and transactional applications. http://support.microsoft.com/default.aspx?scid=kb;en-us;q299973 6
ASP/Cold Fusion + MS Access Why are ASP/Cold Fusion + MS Access only functional and not optimized on your architecture? MS Access was designed as a single-user desktop database, and not for server use. MS-Access 2000/02/03 is functional on our system and suits web applications well when dealing with small- to medium-size business websites that handle a low level of traffic; however, when used on larger enterprise-type websites with a heavy amount of concurrent users making requests to an MS Access database, unpredictable results may occur. We recommend that MS Access be used solely for development purposes and not for production. Recommended Alternative: Although MS-Access 2000/02/03 is functional on our system, for performance and reliability we strongly recommend the use of MS SQL Server for the deployment of production-quality Web applications. Although Active Server Pages work with any ODBC-compliant database (such as MS Access), it has been extensively tested and is designed to work with Microsoft SQL Server. Although the sample Web site and examples in this release use Microsoft Access, we recommend that MS Access be used solely for development purposes and not for production. The following article outlines Microsoft's recommendations to implement an SQL Server Database for use under IIS to accommodate for web, commerce, and transactional applications. http://support.microsoft.com/default.aspx?scid=kb;en-us;q299973 ASP.NET AJAX ASP.NET Ajax has a vast array of components, features and extensions. We have researched and modified our hybrid system to support AJAX on ASP.NET. However some features and functionality may not work as intended, on our hybrid system. Components Not Recommended MS-Access 1997 Why is MS-Access 1997 not recommended on your architecture? The latest MDAC (version 2.8), which is currently installed on our system, is not compatible with Access 97 databases. You may find that your database worked originally; however, once you write data to the database it will generate this error. In our clustered hosting environment, our main focus is security. In order for us to provide you with acceptable levels of security, our operating systems must be configured with current service packs and patches. If this is an Access 2000 database, it is likely that is it corrupted. FrontPage + MS Access Why is FrontPage with MS Access not recommended on your system? Our system architecture does not allow you to edit your MS Access database though the FrontPage GUI. Both must be managed separately. 7
Not Functional Can I register an ActiveX/dll or CFX/dll? Due to security and licensing. Third party components that require licenses or customer written dlls that require registry changes will be installed/registered on our servers. MSSQL DTS MSSQL DTS can be used to transfer larger amounts of data between MSSQL servers. Although we allow the use of DTS for initial transfers during migrations. We do not allow the use of DTS on our shared system on a regular basis. This causes performance issues for other customers. Data loss or DB corruption may also occur in case of disruption in Internet connectivity. Components and tags: The following components are registered on our ASP systems: ServerObjects(TM) Inc. - ASP Mail 4.0.30 Persits Software, Inc. - ASP JPEG 1.9.0.1 Persits Software, Inc. - ASP Upload 3.3.0.6 Persits Software, Inc. - ASP Encrypt 2.3.0.4 Persits Software, Inc. - ASPEmail 5.0.0.5 SoftArtisans, Inc. - SA-FileUP 3.2.0.5 Dimac AB - Jmail 4.1.2.5 ADVANTYS - SmartMail 2.6 ADVANTYS - SmartUpload 3.3 LinkPoint International - Linkpoint 6.0 MSWC.AdRotator MSWC.BrowserType MSWC.ContentRotator MSWC.NextLine The following tags registered on our Cold Fusion systems: CFX_IMAGE CFX_CYBERCASH CFX_ONCR_CYBERCASH3 CFX_PAYGATEWAY CFX_PFPRO CF_imageinfo11, V1.1 8
Windows NT Component/Service Databases MS-Access 2002/03 MS-Access 2000 MS-Access 1997 MySQL MS-SQL 2005 MS-SQL DTS DSN Connections DSN-Less Connections Connections from multiple domains to one specific database on our system. Multiple domain connections do not work with any version of MS- Access. ASP ASP + MS Access ASP + MySQL ASP + MS-SQL ActiveX/dll registration Cold Fusion Cold Fusion + MS Access Cold Fusion + MySQL Cold Fusion + MS-SQL Custom CFML Tags Custom CFX/dll registration MS FrontPage FrontPage + MS Access ASP.NET Clustered Architecture Compatibility Optimized Functional Not Recommended Not Functional ASP.net + MS Access ASP.net + MySQL ASP.net + MS-SQL Precompiled DLL s * ASP.net Ajax Support *Sites coded in Visual Studio, have code separated using code behind and dlls. This is supported, on our ASP.NET 2.0 systems only. 9
ASP.NET ASP.NET is a programming framework built on the Common Language Runtime Environment that can be used on a server to build powerful Web applications. By using ASP.NET you can easily write dynamic, high-performance Web applications in record time. ASP.NET offers a number of important advantages over previous Web development models: Easy Programming Model: ASP.NET makes building real-world Web applications easier. ASP.NET server controls enable an HTML-like style of declarative programming that lets you build great pages with far less code than with classic ASP; displaying data, validating user input, and uploading files are all made easy. ASP.NET pages work in all browsers including Netscape, Opera, AOL, and Internet Explorer. Excellent Tool Support: You can harness the full power of ASP.NET using any text editor including Notepad but Visual Studio.NET adds the productivity of Visual Basic-style development to the Web. Now you can visually design (via WYSIWYG editing) ASP.NET Web Forms using familiar drag-and-drop, doubleclick techniques and benefit from full-fledged code support including statement completion and color-coding. VS.NET also provides integrated support for debugging and deploying ASP.NET Web applications. Rich Class Framework: Application features that were difficult to implement (or required a third-party component) can now be added in just a few lines of code using the.net Framework. The.NET Framework offers over 4500 classes that encapsulate rich functionality like XML, data access, file uploads, regular expressions, image generation, and more. Some new features in ASP.NET 2.0: New Server Controls: ASP.NET 2.0 introduces many new server controls that enable powerful declarative support for data access, login security, wizard navigation, menus, tree views, portals, and more. ASP.NET AJAX-enable Your Web Application: Build next-generation Web interfaces with a full suite of ComponentOne AJAX-enabled ASP.NET components that fully interoperate with the Microsoft ASP.NET AJAX 1.0 Framework. Flexible Extensibility: Developers can plug in custom code anywhere in the page life cycle to further customize ASP.NET 2.0 to their needs. Better Performance: ASP.NET 2.0 also includes automatic database server cache invalidation. ASP.NET CODEBEHIND and Precompiled DLL Visual Studio use codebehind and precompiled dlls for code separation. This provides better security and manageable code, using a tier programming model. Uplink Earth's ASP.NET 2.0 systems are designed to make use of this feature along with other features. This allows customers to easily deploy their site to our systems with little or no changes. 10
Coding Considerations: Customers are responsible for testing their code before moving to our systems. The live environment should not be used for testing or making coding changes on a regular basis. While coding, customers should be aware that files are not stored locally. All customer files are stored on a network share using dynamic paths. Customers are advised not to hard code paths in their code, but to use Server.mappath to point to their files. e.g C:\Inetpub\wwwroot\file.aspx, will not work. Project files, i.e.sln,.csproj,.vbproj, vjsproj,.disco,.vsdisco and other files used for development, should be removed before uploading. Dlls should only be places in the public/bin folder. If the customer wishes to run an application from a folder other than the public folder. A ticket can be submitted requesting the folder be converted to an application folder. The customer can then setup a bin folder within that folder and move dlls to that folder. Why are my changes not showing up on my site? Changes made to files and folders may not be visible immediately in ASP.NET. To maintain the performance of our servers we have disabled the file and folder monitoring feature of ASP.NET. This prevents ASP.NET from constantly monitoring resources and recycling the application, which takes up system resources and causes session issues. I this case our support staff can recycle or change the recycle time for the customer. (default is 120 minutes) Before uploading: Customers are advised to make all changes in their development environment and then upload the final site to our servers. The live environment should not be used for testing or making coding changes on a regular basis. While testing, please check all visual studio debug logs, IIS logs and event viewer application logs. Any errors related to the site should be fixed before uploading. This will ensure a smooth transition to the live environment. Security and performance: Our servers and file systems are constantly being monitored. If any site is found trying to access restricted resources or if our system administrators suspect a site of degrading server performance. ASP.NET services for that site will be suspended and the customer will be notified. Uplink Earth does not support coding issues, especially with dlls since they are compiled and the code cannot be viewed. Customers are responsible for troubleshooting their code on a development system and providing our support staff with details of what their code is supposed to do. If the site is not performing according to their needs. 11
.aspx.asmx.ashx.axd.resx ASP.NET Supported File.ascx codebehind codepage masterfile codefile Extensions not directly accessible through browser: Since they' are critical files, Uplink Earth has modified its configuration to not return any requests specifically for.cfc.cs.vb asax, and.config extensions. A 403 error will be sent instead, but they will still work with windows services. (other extensions may be added at the discretion of Uplink Earth) There may be additional functions, components, extensions that are not supported. If you have any questions in reference to functionality, please contact Technical Support. Some Ajax features may not work on our hybrid system. Please contact Technical Support, if you would like to request a feature. Once approved by our development team the feature will be implemented on system. ColdFusion: ColdFusion provides you with the ability to build and deploy powerful web applications and web services with far less training time and fewer lines of code than ASP or PHP. ColdFusion delivers powerful Internet capabilities within an easy-to-learn and highly productive server scripting environment. ColdFusion contains: An intuitive tag-based language requiring fewer lines of code by handling lowlevel programming tasks automatically and simplifying code reuse. A new server-side ActionScript enabling Macromedia Flash developers to use the same scripting language for both client and server logic. Complete support for new ColdFusion MX features within the Dreamweaver MX development environment, including powerful visual layout and prototyping, enhanced code editing and development capabilities, and integrated debugging. Creates a powerful and compelling user experience: ColdFusion MX provides a robust architecture and a rich set of built-in capabilities that deliver high performance and scalability, enhancing your applications with advanced functionality. Fully integrated application services for adding full-text search, dynamic charting, and high-performance connectivity to Macromedia Flash clients to your applications. 12
Innovative architecture that delivers the scalability, reliability, and power of the Java platform without the complexity. ColdFusion MX 7 Macromedia ColdFusion MX 7 is the most significant release of ColdFusion. Some key features are: Printable Web Content:.Dynamically transform HTML content into PDF or FlashPaper2 format Rich Forms: Use CFML tags to create Rich Flash and XML forms Charting: Read-to-use chart styles, and more than 200 modifiable attributes to control animation, colors, labels and more Uplink Earth provides packages which includes ColdFusion 5, and MX 7. Customers can enable ColdFusion from their WebsiteOS interface. When ColdFusion MX is enabled, it will be added into MX 7 by default. ColdFusion MX 7 is backwardscompatible with MX 6.1 ColdFusion 5 About ColdFusion 5 ColdFusion, developed by Allaire, is a complete Web application server for developing and delivering scalable e-business applications. The ColdFusion solution consists of two related packages: ColdFusion Applications ColdFusion Studio: Tightly integrated with ColdFusion Server, ColdFusion Studio provides visual programming, database, and debugging tools for building sophisticated Web applications. ColdFusion Server: ColdFusion Server offers all the runtime services for delivering your e-business applications built on a highly scalable and open architecture. ColdFusion Scripting Language ColdFusion uses a tag-based, server scripting language that is ideal for programming Web applications. Processed entirely on the server, the ColdFusion Markup Language (CFML) cleanly integrates with HTML for user interface and XML for data exchange. Cold Fusion Tags & Functions: All tags and functions are supported, except the ones in the following tables. These can be made available on our CFMX 7 isolated farms by submitting a request to our technical support department. 13
Restricted Tags and functions: The following tags and functions are restricted on all systems. Custom Cold Fusion Tags Custom CFML tags are supported on our systems. However custom CFX/Dlls are prohibited on the hybrid system. Tags that are poorly coded are known to cause server instability, excessive resource consumption, and reduced site performance. For this reason, CFX/Dlls are much better suited to a dedicated server environment. MS Access Warning Messages Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. Please ensure your database has the proper permissions set. Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x4d4 Thread 0x748 DBC 0x84dbc84 Jet'. The process, Thread and DCB numbers may vary Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt. The latest MDAC (version 2.8), which is currently installed on our system, is not compatible with Access 97 databases. You may find that your database worked originally; however, once you write data to the database it will throw this error. In our 14
clustered hosting environment, our main focus is security. In order for us to maintain our strict security model, our operating systems must be updated with current service packs and patches. If this is an Access 2000 database, it is likely that is it corrupted. Microsoft OLE DB Provider for ODBC Drivers error \'80040e4d\' [Microsoft][ODBC Microsoft Access Driver] Too many client tasks. /index.asp, line 134 This error is not generated by our systems. This error is generated by the Access database engine. Indicating that it has reached its connection limit. We can reset the connections, to temporarily fix the issue, but this will not guarantee that the error will not occur again. Customers should consider switching to MSSQL or MYSQL, that do not have these limitations. Microsoft JET Database Engine error '80004005' Not a valid file name. The MDB file you referenced in your connection string either doesn't exist, or might be malformed (e.g. maybe you just entered a folder name). Response.Write your connection string to the screen and see exactly what it contains. Access DB Connections from multiple domains Why are Connections from multiple domains to one specific database not functional on your system? In the best interest of our clients, our platform does not allow actions of one domain to affect the population of other domains residing on our system. Multiple domains to one specific MS Access database are prohibited on our system due to strict system security settings. Recommended Alternative: If this functionality is required, we recommend the use of an MS SQL database. General Questions How do I connect to my MSSQL DB? Connections for administrative purposes can be made via Microsoft s Enterprise Manager 2000, or Management studio express for MSSQL 2005. Each database created on the Uplink Earth system is assigned a unique Database Name, User Name, and Password. These credentials are used whenever a client attempts to make a connection to the database. 15
1. Start your Enterprise Manager Console, and branch out to the Server group level. 2. At this point you can choose the action menu at the top, and select New SQL Server Registration or right click on your server group and choose the same option. The Register server wizard will start as shown below. 3. Click Next to continue to the next step. 4. In the box called Available servers, enter mssql.megasqlservers.com. 5. Click Add." 16
6. The server name should appear in the Added Servers box. Click Next. 7. At this stage, choose the second authentication mode: The SQL Server Login information that was assigned to be by the system administrator. 8. Click Next. 17
9. Choose a connection option. If you want to login automatically, enter your login name and password in the text boxes provided. Your Login name will be dbm.yourname.com (Substitute your domain name for yourname.com). Your password will be the password you chose with your sales representative. Click Next. 10. At this point, the wizard will prompt you to add the newly registered server to your server group. Select the option labeled, Add the SQL Server(s) to an existing SQL Server group. 11.Click Next. 18
12.At this point, the server registration is completed as shown. Click Finish. 13. You will now have a new server listed in your Enterprise Manager console. You can branch out this server, branch out the databases, and proceed to your database. There you can perform various administrative tasks such as create tables, stored procedures, and more. MSSQL 2005: Start MSSQL studio express. Enter your login information and click connect. 19
Why does my site perform better on my local machine? Many factors affect a site's performance on any platform. Usually when a site is under development on an end-user's local machine, the user is viewing static content which is not required to travel via the Internet to serve any requests. Possible Causes for Broken Sites My Site Worked fine on a non-hybrid system, now it is broken. What are the possible causes and what can I do to fix these problems? Paths Static paths referenced in client code can cause issues when moving into Uplink Earth s Hybrid platform. It is not uncommon for end-users to reference absolute file paths in their code ex. C:\My Documents\index.html. Since site content is not stored on local disk, these file path references are invalid. For sites coded in ASP, we suggest using the Server.MapPath method for defining paths. For sites coded in ColdFusion, we suggest using the GetDirectoryFromPath method for defining paths. For more information, please see the coding examples attached below. COM Objects/DLLS/Active X Controls The Uplink Earth System might not support some COM objects that were utilized on the site from the previous hosting provider. The Uplink Earth System supports a variety of third-party components that have been thoroughly tested File Permissions UNIX based file permissions work differently than NT based file permissions. The correct UNIX permission settings for.asp or.cfm files is -rw-r--r-- or 644 Naming conventions (Case sensitivity) As mentioned above, the Uplink Earth System is Case Sensitive. End-users may believe that they are being hosted on a Windows Only base system which are usually Case Insensitive. Access Database performance issues My Access Database site is performing poorly on the clustered architecture. What are the possible reasons/solutions? For the most part MS Access databases suit web applications reasonably well; however, high traffic sites may benefit from upgrading to a true multi-user database platform such as MS SQL or perhaps even MySQL. We have found that sporadic performance issues occur when traffic intensive sites run on Microsoft Jet and IIS. We have ensured that our system is using the latest Microsoft Jet Components and Updates. We recommend that the native Jet OLE DB provider be used in place of the Access ODBC Driver. 20
Excerpt from Readme.txt (IIS) For performance and reliability reasons, we strongly recommend the use of Microsoft SQL Server for the deployment of production-quality Web applications. Although Active Server Pages works with any ODBC-compliant database, it has been extensively tested and is designed to work with Microsoft SQL Server. ASP also supports Microsoft Access as a valid data source. Although the sample Web site and examples in this release use Microsoft Access, we recommend that Microsoft Access be used solely for development purposes and not for production. Microsoft Access was designed as a single-user desktop database, and not for server use. When multiple, concurrent users make requests of a Microsoft Access database, unpredictable results may occur. Please note that Microsoft has found the following line from the statement to be incorrect "Microsoft Access was designed as a single-user desktop database". The following article outlines Microsoft's recommendations to implement an SQL Server Database for use under IIS to accommodate for web, commerce, and transactional applications. http://support.microsoft.com/default.aspx?scid=kb;en-us;q299973 Payment Gateways Which Payment Gateways are installed on the Hybrid Platform? The following third-party Payment Gateways are currently installed: PayFlow Pro (replacement of Cybercash which is discontinued) Linkpoint PSI Gate (Other Payment Gateways may be installed at the discretion of the Uplink Earth.) SSL How are SSL considerations handled on the Hybrid? SSL for ASP or ColdFusion pages are managed identically to HTML pages on the hybrid. Each server in the Hybrid farm is configured to handle SSL connections from domains within our infrastructure. Please Note: To have a domain activated for ASP or ColdFusion SSL, please direct the end-user to the Windows Services in the WebsiteOS. Please note, this activation could take up to 24 hours to complete. 21
Installed Software: What are the versions of software installed? Application Versions Windows 2003 Server ASP V.3 on IIS 6 ASP.NET on IIS 6 ASP.NET 2.0 AJAX Extensions 1.0 Cold Fusion 5 on IIS 6 Cold Fusion MX 7 on IIS 6 CGI Support (Apache) PERLV.5.006.001 PHP 4.2.2 FrontPage 2002 Extensions V.2002 MS Access Engine MS/MY SQL Database MDAC 2.8 SP1 MS SQL Ver.2005 MySQL-V.4 & 5 Support Components Windows 2003 Server ASP V.3 on IIS 6 ASP.NET on IIS 6 ASP.NET 2.0 AJAX Extensions 1.0 Cold Fusion 5 on IIS 6 Cold Fusion MX 7 on IIS 6 CGI Support (Apache) PERLV.5.006.001 PHP 4.2.2 FrontPage 2002 Extensions V.2002 MS Access Engine MS/MY SQL Database MDAC 2.8 SP1 MS SQL Ver.2005 MySQL-V.4 & 5 22
Coding Examples ASP (ASP) DSN connection for MS Access Set conn = Server.CreateObject("ADODB.Connection") conn.open "DSN=prefix_domain_com (ASP) DSN connection for MS SQL Set conn = Server.CreateObject("ADODB.Connection") conn.open "DSN=prefix_domain_com;UID=dbm.domain.com;PWD=password" (ASP) DSN connection for MySQL Set conn = Server.CreateObject("ADODB.Connection") conn.open "DSN=prefix_domain_com;UID=dbm.domain.com;PWD=password" (ASP) DSNless Connection for MS Access Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" &Server.MapPath( /databse.mdb ) mdbfile = "/stuff/sample.mdb" connstr = "Driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath( mdbfile ) & ";" (ASP) DSNless connection for MS SQL DRIVER={SQLServer};SERVER=mssql.megasqlservers.com;DATABASE=databasename _domain_com;uid=dbm_domain_com;pwd=password; (ASP) DSNless connection for MySQL Driver={MySQL};Server=megasqlservers.com;DATABASE=databasename_domain_com;UID =dbm.domainname.com;pwd=password; (ASP) Defining Paths Server.MapPath("/") equates to \domain.com\public\ Server.MapPath("/images") equates to \domain.com\public\images ColdFusion (ColdFusion) DSN connection for MS Access <cfquery name="schedule" datasource="db_domain _com"> SELECT * FROM Producers </cfquery> 23
(ColdFusion) DSN connection for MS SQL <cfquery name="schedule"datasource="db_domain_com";server= mssql.megasqlservers.com ;U ID= dbm.domain.com ;PWD= password > SELECT * FROM Producers </cfquery> ColdFusion) DSN connection for MySQL <cfquery name="schedule" datasource="db_domain_com"> SELECT * FROM Producers </cfquery> (ColdFusion) DSNless Connection for MS Access <CFSET thispath=expandpath("data\")> <CFSET thisdirectory= GetDirectoryFromPath("thisPath")> <CFQUERY NAME="test" DBTYPE="dynamic" CONNECTSTRING="Driver={Microsoft Access Driver (*.mdb)};dbq=#getdirectoryfrompath(thispath)#mydb.mdb;"> SELECT * FROM MyTable </CFQUERY> (ColdFusion) DSNless connection for MS SQL <CFQUERY NAME="test" DBTYPE="dynamic" CONNECTSTRING=" Driver={SQL Server};Server=servername;Database=dbname;Uid=sa;Pwd=pass;"> SELECT * FROM MyTable </CFQUERY> 24
(ColdFusion) DSNless connection for MySQL <CFQUERY NAME="test" DBTYPE="dynamic" CONNECTSTRING=" Driver={mysql};Server=servername;Database=dbname;Uid=sa;Pwd=pass;"> SELECT * FROM MyTable </CFQUERY> (ColdFusion) Defining Paths <CFSET thispath= ExpandPath("images/")> <CFSET thisdirectory= GetDirectoryFromPath(thisPath)> This equates to the following path: \domain.com\public\images ASP.NET (ASP.NET) DSN connection for MS Access <%@ import Namespace="System.Data" %><%@ import Namespace="System.Data.Odbc" %><%@ Page Language="C#" %><script runat="server"> public void Page_Load(Object sender, EventArgs e) { DataTable dtrecords = GetDataTable("SELECT * FROM info"); foreach(datarow dr in dtrecords.rows) {Response.Write(dr["Name"].ToString() + " " +dr["phone"].tostring() + "<br/>");} } private static string GetConnection() {return "DSN=db1_yourdomain_com";} public static DataTable GetDataTable(string sql) {DataTable rt = new DataTable();DataSet ds = new DataSet();OdbcDataAdapter da = new OdbcDataAdapter();OdbcConnection con = new OdbcConnection(GetConnection());OdbcCommand cmd = new OdbcCommand(sql, con);da.selectcommand = cmd;da.fill(ds);try {rt = ds.tables[0];}catch {rt = null;}return rt;} </script> 25
(ASP.NET) DSN connection for MS SQL <%@ import Namespace="System.Data" %><%@ import Namespace="System.Data.Odbc" %><%@ Page Language="C#" %><script runat="server"> public void Page_Load(Object sender, EventArgs e) { DataTable dtrecords = GetDataTable("SELECT * FROMtable1"); foreach(datarow dr in dtrecords.rows) {Response.Write(dr["name"].ToString() + " " +dr["lname"].tostring() + "<br/>");} } private static string GetConnection() {return "DSN=db2_yourdomain_com;UID=dbm.youdomain.com;PWD=password";} public static DataTable GetDataTable(string sql) {DataTable rt = new DataTable();DataSet ds = new DataSet();OdbcDataAdapter da = new OdbcDataAdapter();OdbcConnection con = new OdbcConnection(GetConnection());OdbcCommand cmd = new OdbcCommand(sql, con);da.selectcommand = cmd;da.fill(ds);try {rt = ds.tables[0];}catch {rt = null;}return rt;} </script> (ASP.NET) DSN connection for MySQL <%@ import Namespace="System.Data" %><%@ import Namespace="System.Data.Odbc" %><%@ Page Language="C#" %><script runat="server"> public void Page_Load(Object sender, EventArgs e) { DataTable dtrecords = GetDataTable("SELECT * FROMtable1"); foreach(datarow dr in dtrecords.rows) {Response.Write(dr["name"].ToString() + " " +dr["lname"].tostring() + "<br/>");} } private static string GetConnection() {return "DSN=db_domain_com;UID=dbm.domain.com;password=pass";} public static DataTable GetDataTable(string sql) {DataTable rt = new DataTable();DataSet ds = new DataSet();OdbcDataAdapter da = new OdbcDataAdapter();OdbcConnection con = new OdbcConnection(GetConnection());OdbcCommand cmd = new OdbcCommand(sql, con);da.selectcommand = cmd;da.fill(ds);try {rt = ds.tables[0];}catch {rt = null;}return rt; } </script> 26
(ASP.NET) DSNless Connection for MS Access <%@ Import Namespace="System.Data.OleDb" %> <script runat="server">sub Page_Loaddim dbconn,sql,dbcomm,dbreaddbconn=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;datasource=" & server.mappath("db/aspx.mdb")) (ASP.NET) DSNless connection for MS SQL <%@ import Namespace="System.Data" %><%@ import Namespace="System.Data.Odbc" %><%@ Page Language="C#" %><script runat="server"> public void Page_Load(Object sender, EventArgs e) { DataTable dtrecords = GetDataTable("SELECT * FROMtable1"); foreach(datarow dr in dtrecords.rows) {Response.Write(dr["name"].ToString() + " " +dr["lname"].tostring() + "<br/>");} } private static string GetConnection() {return "DRIVER={SQLServer};Server=mssql.megasqlservers.com;Database=db_yourdomain_co m;uid=dbm.yourdomain.com;pwd=password";} public static DataTable GetDataTable(string sql) {DataTable rt = new DataTable();DataSet ds = new DataSet();OdbcDataAdapter da = new OdbcDataAdapter();OdbcConnection con = new OdbcConnection(GetConnection());OdbcCommand cmd = new OdbcCommand(sql, con);da.selectcommand = cmd;da.fill(ds);try {rt = ds.tables[0];}catch {rt = null;}return rt;} </script> (ASP.NET) DSNless connection for MySQL using ODBC: <%@ import Namespace="System.Data" %><%@ import Namespace="System.Data.Odbc" %><%@ Page Language="C#" %><script runat="server"> public void Page_Load(Object sender, EventArgs e) { DataTable dtrecords = GetDataTable("SELECT * FROMtable1"); foreach(datarow dr in dtrecords.rows) {Response.Write(dr["name"].ToString() + " " +dr["lname"].tostring() + "<br/>");} } private static string GetConnection() {return "DRIVER={MySQL ODBC 3.51Driver};Server=sql.megasqlservers.com;Database=db_yourdomain_com;UID=dbm. yourdomain.com;password=password";} public static DataTable GetDataTable(string sql) {DataTable rt = new DataTable();DataSet ds = new DataSet();OdbcDataAdapter da = new 27
OdbcDataAdapter();OdbcConnection con = new OdbcConnection(GetConnection());OdbcCommand cmd = new OdbcCommand(sql, con);da.selectcommand = cmd;da.fill(ds);try {rt = ds.tables[0];}catch {rt = null;}return rt; } </script> (ASP.NET) DSNless connection for MySQL using MySql.Data.MySqlClient : MySql.Data.dll needs to be copied to the application/binfolder. <%@ Page Language="VB" debug="true" %> <%@ Import Namespace = "System.Data" %> <%@ Import Namespace = "MySql.Data.MySqlClient" %><script language="vb" runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim myconnection As MySqlConnection Dim mydataadapter As MySqlDataAdapter Dim mydataset As DataSet Dim strsql As String Dim irecordcount As Integer myconnection = NewMySqlConnection("server=sqlc1d.megasqlservers.com; userid=dbm.domain.com; password=passwd; database=db_domain_com;pooling=false;") strsql = "SELECT * FROM testtab;" mydataadapter = New MySqlDataAdapter(strSQL, myconnection)mydataset = New Dataset()myDataAdapter.Fill(myDataSet, "testtab") MySQLDataGrid.DataSource = mydatasetmysqldatagrid.databind() End Sub </script> <html> <head> <title>simple MySQL Database Query</title> 28
</head> <body> <form runat="server"> <asp:datagrid id="mysqldatagrid" runat="server" /> </form> </body></html> Sample web.config file: This is a sample web.config file which allows customers to view any ASP.NET syntax errors. To use this script copy the following into a separate file, name the file web.config and upload to the server: <configuration> <system.web> <compilation debug="true"/> <customerrors mode="off"/> </system.web> </configuration> Errors and warnings: Cold Fusion: Due to security reasons we have disabled debugging, and have generic error messages setup on our servers. This prevents sensitive information from being displayed to visitors. Customers are advised to fix and debug code, on their development servers before moving to the live system. In some cases technical support can be contacted to get the actual message, in case a site is generating generic error messages. ASP.net: By default displays a generic error message. Customers can upload a simple web.config file as show in the examples above. Once the site recycles the actual error message should be displayed. Restricted Extensions: Some extensions are set to not return any requests through the browser, for specific file types. Such as.cfc,.cs,.vb,.ascx,.config,.master extensions. A 403 error will be displayed. These files can however be invoked or called from other files. (other extensions may be added at the discretion of Uplink Earth) 29