Getting Your Site Online

Troubleshooting

Here you can learn about fixing common errors encountered after publishing C1 CMS websites.

To successfully troubleshoot errors, you should first turn on detailed ASP.NET error messages.

Turning On Detailed ASP.NET Error Messages

A good start to finding a fix to an error is turn on the detailed ASP.NET error messages in web.config and re-publish web.config again.

In most cases, you will access your website remotely. By default, remote users will see custom errors (“RemoteOnly”), which are not informative. You have to turn off custom errors (“Off”). This automatically enables detailed ASP.NET errors.

  1. Edit web.config on the local copy of your website.
  2. Locate the element: configuration/system.web/customErrors
  3. Set the value of its mode attribute to “Off”.
    <configuration>
       <system.web>
           <customErrors mode="Off" />
       </system.web>
    </configuration>

    Listing 1: Turning on detailed error messages in web.config

  4. Save the file.
  5. Re-publish web.config to your hosting server.
  6. Reopen the website.

When you start the website, you will be able to see detailed information about errors if any.

Please note that once the error is detected and fixed, you should turn off the detailed error messages, that is, turn the custom errors back on. For this, repeat Steps 1-5 but this time set the value to “RemoteOnly”.

The following is the list of typical errors you may encounter after publishing your C1 CMS website to your Web hosting.

Wrong .NET Version

When you open your website, you can get the server error: “Unrecognized attribute 'targetFramework'”.

Figure 7: Error when running on the wrong .NET version

This error occurs if your website is running on the wrong .NET version.

If you have access to IIS, do as described below. Otherwise, follow the standard procedure of changing the .NET Platform version on your web hosting or contact your web hosting provider.

On IIS 7:

  1. Edits your website Basic Settings.
  2. In the Application Pool field, select the application pool with the .NET Framework version required by C1 CMS (see “System Requirements”).


    Figure 8: Selecting an application pool with .NET Framework on IIS 7

  3. If you do not have such a pool, create it.

On IIS 6:

  1. Open the Properties of your website.
  2. Open the ASP.NET tab.
  3. In the ASP.NET version field, select “4.0.319” (or a similar value - please see “System Requirements”)

Figure 9: Selecting the ASP.NET version for a C1 CMS website on IIS 6

No Sufficient Permissions on the Website Directory

When you open your website, you can get the server error: “HTTP 500.19”, “Cannot read configuration file due to insufficient permissions”.

Figure 10: Error when having no sufficient permissions on the website directory

This error occurs if you do not have sufficient (modify, read, write etc) permissions on the website directory.

If you have access to IIS, do as described below. Otherwise, follow the standard procedure of setting permissions on website directories on your web hosting or contact your web hosting provider.

On IIS or in Windows explorer:

  1. Edit permissions on the website directory.
  2. Make sure that modify, execute, list, read, and write permissions are set for the identity your website is running under. (On IIS 6, it should be “NETWORK SERVICE” under which ASP.NET is running. On IIS 7, it should be the identity under which the application pool used by your site is running.)

Figure 11: Setting proper permissions on the website directory

No Write Permissions on the Website Directory

When you open your website, you can get the server error: “Access to the path 'C:\inetpub\C1-CMS\App_Data\Composite\Configuration\FirstTimeStart.xml' is denied.”, or something similar.


Figure 12: Error when having no write permissions on the website directory

This error occurs if you do not have write permissions on the website directory.

To troubleshoot it, do as suggested in “No sufficient permissions on the website directory”.

Not Run as an Application on IIS

When you open your website, you can get the server errors for example: “CS0246: The type or namespace name 'Composite' could not be found (are you missing a using directive or an assembly reference?)”.

Figure 13: Error when not running a C1 CMS website as an Application

This error occurs if run your C1 CMS website on IIS 7 as a Virtual Directory. This works on IIS 6, but on IIS 7 you should run a C1 CMS website in a subfolder as an Application.

If you have access to IIS, do as described below. Otherwise, make sure that a subfolder you run a C1 CMS website in is configured as an IIS Application and not a Virtual Directory by following the standard procedure of configuring your remote website on your web hosting or contact your web hosting provider.

On IIS 7, do one of the following:

  1. Right-click the C1 CMS website’s subfolder.
  2. In the context menu, click Convert to Application.
  3. Fill out the fields and click OK.

or

  1. Right-click the C1 CMS website you want to create a subfolder in.
  2. In the context menu, click Add Application.
  3. Fill out the fields and click OK.
  

Figure 14: Adding a C1 CMS website as an Application in a subfolder