WCF Error : Relative end point addresses

前端 未结 3 2055
死守一世寂寞
死守一世寂寞 2021-02-19 15:40

Um quite new to WCF . I think I have messed up a bit. So this is what I did so far and I ve hosted my WCF service in IIS

First the Contracts

using System         


        
3条回答
  •  一向
    一向 (楼主)
    2021-02-19 16:26

    Set the service endpoint address to just the service filename (this is the relative part):

    address="Service1.svc"
    

    or set the address to blank for each endpoint (I don't think its needed when hosting in the development environment or in IIS)

    address=""
    

    See this answer to another question

    The relevant part is:

    the virtual directory (in IIS) where your *.svc file exists defines your service endpoint's address.

提交回复
热议问题