Please see the code below (Image Hander):
<%@ WebHandler Language="VB" Class="com.Genie.PresentationLayer.Web.ImageHandler1" %>
Imports com.Genie.BusinessLogicLayer
Namespace com.Genie.PresentationLayer.Web
Public Class ImageHandler1
Inherits ImageHandler
Private p1 as Person
Public Sub New()
End Sub
end class
end namespace
com.Genie.BusinessLogicLayer was added to the GAC today. The application produces a runtime error when it gets to the Image Handler: 'Type Person is not defined'. Adding an assembly to the web.config as follows resolves the problem:
<assemblies>
<add assembly="BusinessLogicLayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken="669e0ddf0bb1aa2a"/>
</assemblies>
Why do I have to amend the web.config? I thought 'Add Assembly' was for website projects that do not use MSBuild (and therefore do not have 'References'). This is a web application project.