Intro to AJAX Samples Configuration

Home


In order to run these demos you need the following:


Office Web Components

One of the demos - the ATLAS Stock sample - requires the Office Web Components. The interop assembly is GAC'd and needs to be assigned in web.config. So if the components are not installed the application will fail. You can download the components from the link above.  If for whatever reason you can't install the Office Web Components, you will need to remove (or rename) the StockDisplay.aspx page which uses them. You also need to remove the reference in Web.Config:

<assemblies>

  <!-- add assembly="Microsoft.Office.Interop.Owc11, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" / -->

  <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

  <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089 " />

</assemblies>


 

Database

This sample ships with the AjaxAspNet Database in the APP_DATA directory. This database contains the Northwind Database plus a few other other tables that are used for the Stock and long request processing sampels. Hence the separate database <g>. If you run SQLExpress you should just be able to run the application as is. If you only have SQL Server you will have to attach to the database in the APP_DATA directory directly.

Connection String Setup

The samples use a custom business object to perform data access and this business object pulls its connection string through a configuration class in App.cs called AppConfiguration. A default connection string is defined there in the ANorthwindConnectionString property.

This configuration class will also write its keys into the AppSettings of web.config given that the account your Web Application is running under (ASPNET or NETWORK SERVICE usually) has Write access to the web.config file. If you are running using the ASP.NET Web server you will have rights and the entry will exist in web.config. If you run IIS you need to explicitly make sure that you give the appropriate account WRITE access.

If the settings are in the AppSettings of Web.config you can change the connection string there for the: 

<appSettings>

      <add key="ApplicationConnectionString"value="Data Source=(local);Initial Catalog=AjaxAspNet;Integrated Security=True"/>

  <!-- add key="NorthwindConnectionString" value="Data Source=.\SQLEXPRESS;AttachDbFilename=c:\webapps\scriptcallbacks\DataDirectory|\AjaxAspNet.mdf;Integrated Security=True;User Instance=True" / -->

</appSettings>

If you haven't set permissions you can change the default value in App.cs directly. Make sure to configure the connection string by configuring the Northwind database appropriately and then assigning the correct connectionstring.

       wwHoverPanel

The wwHoverPanel control in these samples is stored in wwWebControls.dll rather than wwHoverPanel.dll as some of the demos are using some additional controls from a custom library. Rather than providing the control in two places I decided to add my full control library to the project. I don't provide the source code to the full wwWebControls.dll control library, but there IS full source code to wwHoverPanel, which is provided in a separate project. If you plan on using wwHoverPanel in your own projects you should use the wwHoverPanel.dll control assembly instead of wwWebControls.dll. If you end up using these samples as a template, make sure you change the @Register tag's src= tag to wwHoverPanel.

IIS Configuration

If you plan on running with IIS rather than the built-in ASP.NET Web Server, you can run the provided _WebConfiguration.exe file, which can be used to set up a virtual directory and set directory permissions directly. Simply run the utility out of the sample directory with Explorer. Once done you can navigate to the virtual directory you configured - ScriptCallbacks by default.