Search code examples
asp.netwebweb-config

Referencing code in App_Code from web.config


I have a type in my App_Code folder from a Web Site project that I want to refer to in Web.config. The type attribute is requiring me to put in an assembly name. The internets is failing me with what to put in for the assembly.

Specifically in,

<system.web>
    <webServices>
        <soapExtensionReflectorTypes>
            <add type="MyType, $App_Code$" />
        </soapExtensionReflectorTypes>
    </webServices>
</system.web>

What do I put in $App_Code$ to make it compile? I've tried _ _ code, App _code, App _Code (Markdown is failing here: those type names don't have spaces in them)


Solution

  • OK, I found the answer on some obscure MSDN forum: you can't do that in a Web Site project for system.web/webservices/soapExtensionReflectorTypes. Only a Web Application Project will suffice.