SmartAssembly 6

Setting up a custom web server for reporting

This feature is available in SmartAssembly Professional only.

You can set up a custom web server for error reporting and feature usage reports. This changes SmartAssembly, so that reports are sent to a web service running on your own server, rather than the default one operated by Redgate. 

Most users of SmartAssembly do not need a custom web server. However, if you build applications for internal use in your company, and your company has a firewall that would prevent communication with the Redgate-hosted web service, you will need to use a custom web server. 

The custom web server is distinct from the SQL server. The custom web server hosts the web service to which reports are sent before they are downloaded to your SQL server or .mdb file:

The role of the web service for error reports:

 

 

The role of the web service for feature usage reports:

 

 

To set up a custom web server:

  1. Download the zip archive containing the custom web service files.
  2. Create a directory for SmartAssembly on your web server.
    For example, http://www.myWebServer.com/saWebServices/.
  3. Copy the three .asmx files (Login.asmx, Reporting.asmx, and UploadReportLogin.asmx) and the Web.config file from the zip archive to the directory you just created.
  4. Copy ClientAccessPolicy.xml into the root directory of your web server.
  5. Open the /bin/ directory within the .zip archive.
  6. Copy SmartAssembly.WebService.dll and log4net.dll into the /bin/directory of your web server.
    If the /bin/ directory does not already exist, create it in the root directory of your web server.
  7. Verify that the first part of the setup is correct by calling the web service from your browser: http://www.myWebServer.com/saWebServices/UploadReportLogin.asmx.
    Confirm that you are displaying the standard web service welcome page.
  8. Create a folder on the web server, which is not publicly accessible.
    This folder is where reports are stored when they are uploaded. The web service must have write access to the folder and its sub-folders.
    In the example below, the physical path for the reports folder is c:\MyCustomWebServer\. Edit the server's web.config file to add this location:

    <configuration>
     ...
      <appSettings>
       <add key="ReportsFolder" value="c:\MyCustomWebServer\" />
      </appSettings>
     ...
    </configuration>
  9. In SmartAssembly, click Options. Under Custom web server, select I want to use my own web server. Enter the URL of the directory which contains the web service.
  10. Test your new web service.

Troubleshooting the custom web service

The custom web service logs any errors that occur by default. The error logs are stored on your web server in the directory where the SmartAssembly web service was installed.

The logs are created using log4net. For information about how to configure logging, see Configuration in the log4net manual.

Disabling error logging

If required, you can disable error logging in the custom web service. To do this:

  1. On the web server, navigate to the directory where the SmartAssembly web service was installed.
  2. Open Web.config in an XML editor.
  3. Change <level value="ALL"> to <level value="OFF">.

Didn't find what you were looking for?