gene
gene

Reputation: 2108

Getting an error when trying to execute a project referencing a dll library project through Web.config

My solution's Web app has a Web.config file referencing a project's module that needs to be called as a precondition:

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <add name="ErrorModule" preCondition="integratedMode" type="MyTestProject.ErrorModule.ErrorHandler"/>
    </modules>
    <security>
      <requestFiltering>
        <verbs>
          <add verb="TRACE" allowed="false"/>
        </verbs>
      </requestFiltering>
    </security>
  </system.webServer>

When I'm running my project, I'm getting an error right away saying the following:

Server Error in '/' Application.

Could not load type `'MyTestProject.ErrorModule.ErrorHandler'`.

I cannot run that Test project by itself, since it doesn't have Main method since it's a library.

The starting project used to be set to run on Framework 2.0, but I needed to change it to Framework 4.0 since it needs to reference System.Web.Extensions.dll

The target Framework for MyTestProject is 4.6.1

What am I missing here?

Upvotes: 1

Views: 12

Answers (0)

Related Questions