Dynamic-CD |
ASP.NET is supported by the Dynamic-CD.Net version of
Dynamic-CD.
User systemsAutoPlay
A Dynamic-CD.Net CD, DVD or USB-memory-device will attempt to AutoPlay when inserted
into a user's Windows computer. If AutoPlay is turned off, the user can try double-clicking
the drive icon in My Computer, or explore the drive and click Windows version checkDynamic-CD.Net only runs on Windows XP, Windows Vista, Windows 7 (equivalent or later). If you try to run on a earlier version of Windows, Dynamic-CD displays a suitable error message and exits. .NET version checkDynamic-CD.Net checks to see if .NET is installed, and the latest version installed. If .NET is not installed or the latest version is earlier than 2.0, then a suitable error message is displayed and Dynamic-CD exits. If your site depends on a specific version of .NET/ASP.NET, you will need to add in code to check for this. (If this is something that you think should be provided in Dynamic-CD.Net then please get in contact.) Firewall blockWindows may display a Security Alert saying that it had blocked some features of Dynamic-CD, ie its ability to communicate on private or public networks. Dynamic-CD.Net will continue to run fine whichever options are selected. Other dependenciesCheck carefully to see if your site has any software dependencies, ie software that your users must have installed. For example, if you are using Access 2007 database files (with .ACCDB extension) make sure you provide instructions for the user to download the relevant drivers if they need to - or provide the relevant installs on the CD. Dynamic-CD.Net Web Server
Dynamic-CD.Net is a web server that runs locally, by default on port 8090, so it
would typically respond at Most served files and their HTTP headers are generated by the Microsoft ASP.NET engine. "Etag" and "If-None-Match" response and request HTTP headers are supported. Password-protected files are served directly by Dynamic-CD.Net. "Last-Modified" and "If-Modified-Since" response and request HTTP headers are supported. Directory listings are turned off by default. TO DO: provide an option to enable this. The default file served for directory access is taken from the first file found in this list:
Various file types (eg .CONFIG) and files in various restricted directories are not served to the user (though they can be found by exploring the CD). By default, access to Dynamic-CD.Net is only enabled on the local computer. However, a Dynamic-CD-Wizard option lets you enable access from other computers, both on your private network and from the wider public internet - though firewall rules may stop such accesses. It is best not to enable this option for CDs distributed to the public. ASP.NET supportDynamic-CD.Net builds on the standard ASP.NET engine provided by Microsoft, and is based on the Cassini web server 3.5 source code, available under the Microsoft Public License (Ms-PL). See also: CodePlex Cassini++. In general, Dynamic-CD.Net supports all ASP.NET features, so User controls, HttpModules and HttpHandlers are supported, along with ViewState, Cookies and Session variables.
The web site runs within a single application domain at root level, eg Dynamic-CD.Net has a platform target of x86 (32 bit) and will run on x86 and x64 (64 bit) systems. The reason for choosing a target of x86 is so that the Microsoft Jet driver for Access MDB database files works. If you need a version that targets Any CPU or x64 then please get in touch. Using databases
VB.NET Access MDB exampleThis example shows a VB routine to open an Access MDB file (using the Microsoft Jet driver) and display all columns in all rows - it is the Click handler for the ShowDb button, putting the results in the lblResults label. Protected Sub ShowDb_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ShowDb.Click Dim DbPath As String = Server.MapPath("~/MyDatabase.MDB") Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DbPath Dim adoCon As OleDbConnection = New OleDbConnection(connectionstring) adoCon.Open() Dim strSQL As String = "SELECT * FROM MyTable" Dim dbCmd As OleDbCommand = New OleDbCommand(strSQL, adoCon) Dim drCmd As OleDbDataReader = dbCmd.ExecuteReader() While drCmd.Read Dim i As Integer For i = 0 To drCmd.FieldCount - 1 lblResults.Text &= HttpUtility.HtmlEncode(drCmd(i).ToString()) & " " Next i lblResults.Text &= "<br>" End While drCmd.Close() drCmd = Nothing adoCon.Close() adoCon = Nothing End Sub C# Access ACCDB exampleThis example shows a C# routine to open an Access ACCDB file (using the Microsoft ACE.OLEDB driver) and display all columns in all rows - it is the Click handler for the ShowDb button, putting the results in the lblResults label. This time, column name:value pairs are shown. protected void ShowDb_Click(object sender, EventArgs e) { string rv = null; string strSQL = "SELECT * FROM MyTable"; rv = "<b>" + strSQL + "</b><br>"; string DbPath = Server.MapPath("MyDatabase.accdb"); string connectionstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + DbPath + ";Persist Security Info=False;"; using (OleDbConnection adoCon = new OleDbConnection(connectionstring)) { adoCon.Open(); OleDbCommand dbCmd = new OleDbCommand(strSQL, adoCon); OleDbDataReader drCmd = dbCmd.ExecuteReader(); while (drCmd.Read()) { for (int colno = 0; colno < drCmd.FieldCount; colno++) { string ColName = drCmd.GetName(colno); string ColValue = drCmd[colno].ToString(); rv += HttpUtility.HtmlEncode(ColName+":"+ColValue + " "); } rv += "<br>"; } drCmd.Close(); adoCon.Close(); } lblResults.Text = rv; } Protecting code and databasesVarious file types (eg .CONFIG, .CS, .VB and others) and files in various restricted directories are not served to the user. However these files are easily visible directly on the CD. So do not put any sensitive information in these files, eg email account details or connection strings for online databases. The above file types (and ASPX files and others) cannot currently be password-protected by Dynamic-CD-Wizard as the ASP.NET system needs direct access to these files.
One potential solution is to compile your codebehind files into a DLL to go in the
Database files cannot currently be password-protected by Dynamic-CD-Wizard. You can add a password to Access database files but this is usually easily cracked. However this may provide a measure of protection against idle viewers. You will then have to ensure that your connection string contains the password, and ensure that your connection string is protected.
|
Home Purchase Licenses Limitations Version details Site map Contact Copyright © 2000-2022 phdcc |
Dynamic-CD : the web server on CD | Learn more | What's new |