The type [nameHere] registered for extension '[extensionHere]' could not be loaded

前端 未结 1 1480
情书的邮戳
情书的邮戳 2021-02-05 15:43

I\'ve been learning and building JSONP Web services using WCF on fx3.5. You can read some of the trials I had at .NET ASMX - Returning Pure JSON? I finally got a sample running

相关标签:
1条回答
  • 2021-02-05 16:01

    Is the dll (RivWorks.Web.Service.dll) in the build output?

    Next, try (for the "jsonpMessageEncoding" extension):

    type="RivWorks.Web.Service.JSONP.JsonpBindingExtension, RivWorks.Web.Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
    

    Note the different spacing both in terms of " , " and carriage returns.

    After that, I would treble check the string. Write a console exe that references the dll you need (RivWorks.Web.Service), and output:

    Console.WriteLine(
         typeof(RivWorks.Web.Service.JSONP.JsonpBindingExtension)
         .AssemblyQualifiedName);
    

    That is the string you want in the xml, verbatim. Don't include any extra whitespace in this string.

    0 讨论(0)
提交回复
热议问题