c# - Using Unity in child web site (IIS 8.5): "An abstract InjectionMemberElement object cannot be created." -
i trying create kid web site in iis 8.5 , running configuration error on line of web.config.
the error follows:
server error in '/holiday' application.
configuration error
description: error occurred during processing of configuration file required service request. please review specific error details below , modify configuration file appropriately.
parser error message: error occurred creating configuration section handler unity: abstract injectionmemberelement object cannot created. please specify concrete type.
the parent application uses unity dependency injection.
any way avoid this? not appear there way tell site ignore parent unity configuration.
you should able set different names on web.config sections in parent , kid website.
parent:
<configsections> <section name="unityparent" type=" ... "/> </configsections> <unityparent xmlns="..."></unityparent> child:
<configsections> <section name="unitychild" type=" ... "/> </configsections> <unitychild xmlns="..."></unitychild> this should prevent sections conflicting. can remove in kid config specifying parent section name:
<configsections> <remove name="unityparent"/> <section name="unitychild" type=" ... "/> </configsections> <unitychild xmlns="..."></unitychild> c# asp.net .net asp.net-mvc unity-container
No comments:
Post a Comment