Friday, April 18, 2008

ODBC Error in IIS 7

In ASP classic application that runs on IIS 7 you might face that ODBC error "[Microsoft][ODBC Microsoft Access Driver] Your network access was interrupted. To continue, close the database, and then open it again."

to resolve this error, open the "applicationHost.config" file in "<Windows Folder>\System32\InetSrv\config" and update this key :

<applicationPoolDefaults>
    <processModel identityType="NetworkService" />
</applicationPoolDefaults>

to

<applicationPoolDefaults>
                <processModel identityType="NetworkService" loadUserProfile="false" />
            </applicationPoolDefaults>

 

and this should fix your problem.

Crazy Message "An error occurred on the server when..."

In some ASP classic forms you may find this error messages displayed in your page:

"An error occurred on the server when processing the URL. Please contact the system administrator"

this messages will drive you crazy as you don't know what is happening in the background. Follow these steps to display the real error:

  1. Open your IIS manager.
  2. Select your Website from the tree on the left.
  3. In the displayed panel on the right open ASP item

    Prop1
  4. In the properties dialog expand the Compilation section then expand the Debugging Properties item.
  5. Set the Enable Client Side Debugging property to True and set the Send Errors to Browser to True.

    Prop2
  6. Apply changes.