The 'contract' attribute is invalid. The value '#####.Services.SessionPool' is invalid according to its datatype 'serviceContractType'-The Enumeration

1 posts, 0 answers
  1. big
    big avatar
    1 posts
    Member since:
    Jun 2015

    Posted 15 Jun 2015 Link to this post


    I have almost developed a website using Dot net, C#, Jquery, Javascript etc. Now, for having chat among visitors, we picked the AJAX  code from and customized it... 

    When we see the demo in there, it successfully shows the chatboxes and implements the chats well... But we couldn't able to integrate it with our already built web application (Web forms and not MVC). Since we get no errors, its very hard to predict the issue clearly. Do I have to make some changes in web.config?

    Getting a warning alone which is

    Warning 1 The 'contract' attribute is invalid - The value 'PlayZone.Services.SessionPool' is invalid according to its datatype 'serviceContractType' - The Enumeration constraint failed. E:\Projects\PlayZoneJUNE04\PlayZone\Web.config 57 48 PlayZone

    Actually, I took the code from MSDN and pasted it successfully. The problem seems to occur in the Web.Config's service region.


    <services>      <service name="WebChat.Services.Transition">        <endpoint address=""behaviorConfiguration="Sever.Services.TransitionAspNetAjaxBehavior"            binding="webHttpBinding" contract="WebChat.Services.Transition" />      </service>      <service name="WebChat.Services.SessionPool">        <endpoint address="" behaviorConfiguration="Sever.Services.SessionPoolAspNetAjaxBehavior"            binding="webHttpBinding" contract="WebChat.Services.SessionPool" />      </service>    </services>

    Here are the overall details

    i) I downloaded Ajax based group chat, which was done following the procedures on the page

    ii) The sample alone as a separate site works fine... But when combined with my website code, it shows the warnings and the chat is not working.

    iii) Our Dot net framework version is 4.5... but the web chat's framework on MSDN shows version 4 when run alone.

    iv) Server - IIS (Local machine)

    Hope this helps you to understand further. Thanks for your concern and have a nice day ahead.

Back to Top