none
unable to add domain service in vs2015

    Question

  • Hi All
    I am using Vs2015 Silverlight 5
    To create a new Silverlight project
    1 - From Silverlight Template I Select Silverlight Application name "NewSilv"
    2 - Ceck Enable WCF RIA Service
    3 - In NewSiv Properties I Select <No Project Set> to WCF RIA Service link
    4 - Add a new project to Solution from Silverlight Template I select Silverlight Class Library name "SilvClass"
    5 - Add a new project to Solution from Windows Template I select Class Library name "NetClass"
    6 - Delete Class1.cs from both Library classes
    7 - Build Solution (4 succeeded)
    8 - Change SilvClass Property WCF RIA Service link to NetClass
    9 - Add New Item to NetClass (Domain Service Class Library) From Data (ADO.NET Entity Data Model) name "Model1"
        then select EF Designer from Database then Next
        then Create connection
        then select Entity Framework 6x version
        then Add some tables and click Finish   edmx file Create and show it
    10 - Build NetClass successfuly
    11 - Add New Item to NetClass (Domain Service Class Library) From Web (Domain Service) name DomainService1.cs
    Raise Error Visual Studio returned an HttpException this may indicate that you are missing the httpRuntime is missing from web.config. For more details go to http://bit.ly/1jeC1LT
    above link doesnot help me
    After that new Error message "The configuration system has already been initialized"
    where am I wrong?
    Monday, September 18, 2017 7:42 AM

All replies

  • Hi Mohammad Imanloo,

    As far as I know, we need to add Domain Service in Web project. Please try add the Domain Service to NewSilv.Web project to check this problem gone.

    In addition, following document introduce how to add domain service in Silverlight 5 application. Hope that could help you.

    http://www.c-sharpcorner.com/uploadfile/mahadesh/silverlight-5-wcf-ria-services-part-1/

    And also please check your Visual Studio 2015, make sure it is in the latest version. You could check through Tools -> Extensions and Updates -> Updates to check whether there has any updates for Visual Studio 2015.

    Best Regards,
    Weiwei


    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.

    Wednesday, September 20, 2017 8:51 AM
    Moderator
  • Hi Weiwei

    yes, but I want fetch data via class library

    thank you for your reply

    Best Regards

    Imanloo

    Thursday, September 21, 2017 3:53 AM
  • Hi Mohammad Imanloo,

    If you want to create a class library to fetch data, you could refer to following document about how to Creating a RIA Services Class Library and how use it in Silverlight application.

    https://msdn.microsoft.com/en-us/library/ee707351%28v=vs.91%29.aspx?f=255&MSPPError=-2147217396

    The screenshots is VS2010. In Visual Studio 2015, you could choose Open RIA Service Library which is shown as below screenshot.

    Best Regards,
    Weiwei


    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.

    Friday, September 22, 2017 7:46 AM
    Moderator