How to use StructureMap from xml

trapysteari

New Member
In my project I'm using StructureMap for DI and associations are set up in the web.config file like this:\[code\]<StructureMap MementoStyle="Attribute"> <DefaultInstance PluggedType="CTRMModels.Models.Repository, CTRMModels" PluginType="CTRMModels.Models.IRepository, CTRMModels" Scope="HttpContext" /> <DefaultInstance PluggedType="ActiveReports.Security.CtrmSecurityProvider, ActiveReports.Security" PluginType="ActiveReports.Server.Security.ISecurityProvider, ActiveReports.Server.Extensibility" Scope="HttpContext"> <Property Name="connectionString" Value="http://stackoverflow.com/questions/12427340/Data Source=.;Initial Catalog=db;Persist Security Info=True;Integrated Security=True;" /></DefaultInstance>\[/code\]The first setup works but the second doesn't. The CtrmSecurityProvider class' constructor looks like this:\[code\]public CtrmSecurityProvider( string connectionString ){...}\[/code\]What am I doing wrong? Thanks in advance.
 
Back
Top