Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 01, 2012 12:52 PM by BrockAllen
May 01, 2012 09:14 AM|LINK
I just try out Unity in mvc app.
In the global.asax I do my setup code.
I have this mapping:
This mapping works in the Application.
Now I would like to switch to xml-mapping in the webconfig-file.
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<!-- this is my Maping -->
<type type="MvcApplication1.IPlayer" mapTo="MvcApplication1.Player" />
But this Mapping don't work.
What is wrong?
May 01, 2012 09:25 AM|LINK
check this link for a tutorial
May 01, 2012 12:52 PM|LINK
You also need to register the assembly that contains those types. I forget the syntax, but there's an <assembly> config element that you have to throw in there. You can also register a <namespace>.