none
How to update WCF service APIs in IIS website RRS feed

  • Question

  • I am new to WCF Service and IIS. Please help. Set up is mentioned below. 1. I have Entity framework project which deal with Database. 2. Then I have WCF service class library (no app.config file) which writes or read values from EF project. 3. At the end I have website project (ASP.Net Website) which hosts WCF service on IIS (This project has Web.Config file which contains WCF service configuration). 4. In IIS, I created a new application under Default Web Site. When I browse the Service.svc file, I can see all the APIs\methods exposed by WCF service.

    Now the problem is, it worked first time. But I want to add new APIs in WCF service, but those APIs are not getting reflected in IIS hosted URL.

    Things I tried -> 1. Building entire solution. 2. Removing reference of WCF project libraries from website project and reattaching. 3. Building website and publishing website. 4. Reset IIS Manager and refresh everything.

    Please help how can I update the APIs exposed in IIS when update the WCF service.

    Monday, October 9, 2017 10:32 PM

Answers

  • Hi AnkitaGoel,

    >> But I want to add new APIs in WCF service, but those APIs are not getting reflected in IIS hosted URL

    Could you share us detail steps how you added new APIs?

    It would be helpful if you could share us related code.

    I suggest you check whether you added “[OperationContract]” on the new API methods in the ServiceContract Interface or Class.

    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.

    • Marked as answer by AnkitaGoel Thursday, October 12, 2017 10:33 PM
    Thursday, October 12, 2017 5:34 AM

All replies

  • Hi AnkitaGoel,

    >>When I browse the Service.svc file, I can see all the APIs\methods exposed by WCF service.

    Could you share us a screen shot about this? Is your service WCF SOAP Service or Rest Service? How did you enable APIS/Methods?

    Could you make a test with new added method, will it work or throw not exist error?

    In my option, for a normal SOAP Service, Service.svc file will return below result.

    For Rest Service which enable help page, it will return below result.

    Could you share us how you expose API/Method?

    It would be helpful if you could share us a solution, and then we could try to reproduce your issue.

    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.

    Tuesday, October 10, 2017 1:28 AM
  • Thank you for your reply. I am using normal SOAP Service (the first screenshot) - WCF Service. Can you please help if I make any changes in Entity framework project and\or in WCF Service project, what are the steps to get them to IIS exposed service? So service clients can see those changes
    Tuesday, October 10, 2017 10:38 PM
  • Hi AnkitaGoel,

    >> When I browse the Service.svc file, I can see all the APIs\methods exposed by WCF service

    For WCF Soap Service, you could find my first image, there is no any api/method while accessing service.svc file.

    Could you share us how did you achieve this?

    Could you share us a screen shot about browsing Service.svc file?

    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.

    Wednesday, October 11, 2017 3:04 AM
  • I am sorry, I might have missed the step in explaining. I can see APIs when I click on 

    svcutil.exe http://localhost/CommandTron/Service.svc?wsdl

    


    Wednesday, October 11, 2017 2:27 PM
  • Hi AnkitaGoel,

    >> But I want to add new APIs in WCF service, but those APIs are not getting reflected in IIS hosted URL

    Could you share us detail steps how you added new APIs?

    It would be helpful if you could share us related code.

    I suggest you check whether you added “[OperationContract]” on the new API methods in the ServiceContract Interface or Class.

    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.

    • Marked as answer by AnkitaGoel Thursday, October 12, 2017 10:33 PM
    Thursday, October 12, 2017 5:34 AM
  • You were right. I missed the OperationContract attribute. 

    For changes to reflect in service hosted by IIS, I build and publish the website project. Do you think this is the correct way to do it ?

    Thursday, October 12, 2017 10:33 PM
  • Hi AnkitaGoel,

    >> I build and publish the website project. Do you think this is the correct way to do it ?

    Yes, that's right.

    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.

    Friday, October 13, 2017 2:11 AM