none
WCF and Unity IoC is there a working tutorial about this? RRS feed

  • Question

  • I have tried two tutorials on WCF and Unity with both having snags in them like it worked for version 3.5 Unity for WCF but not in 4.0 Unity for WCF.

     
    Sunday, July 30, 2017 8:58 PM

Answers

  • Well, I had to make a project with the  WcfServiceFactory class.  I had to set Unity to version to 3.5.1440 snd use it.  I copied the DLL to the Bin folder in the virtual directory on IIS for the WCF Web service.

    Unity works.

    • Marked as answer by DA924x Monday, July 31, 2017 11:59 PM
    Monday, July 31, 2017 10:46 PM

All replies

  • Hi DA924x,

    What tutorials do you have, and what error did you get under 4.0 Unity for WCF?

    I suggest you check whether below link meets your requirement.

    # https://github.com/Uriil/unitywcf

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 31, 2017 2:08 AM
  • I used the tutorial mentioned, but when I try to Update Service Reference, I get the following error. I am hesitant in just putting WcfServiceFactory code in it own project in order to get a CLR Type putting it in the Bin folder. 

    [HttpParseException]: The CLR Type 'WcfService1.WcfServiceFactory' could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application's \\App_Code directory, contained in a compiled assembly located in the application's \\bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \\App_Code and \\bin must be located in the application's root directory and cannot be nested in subdirectories.

     
    Monday, July 31, 2017 1:55 PM
  • Well, I had to make a project with the  WcfServiceFactory class.  I had to set Unity to version to 3.5.1440 snd use it.  I copied the DLL to the Bin folder in the virtual directory on IIS for the WCF Web service.

    Unity works.

    • Marked as answer by DA924x Monday, July 31, 2017 11:59 PM
    Monday, July 31, 2017 10:46 PM