WCF podstawowa conf

0

Witam,
mam problem ze skonfigurowaniem WCF na razie ustawiłem tylko services i chciałem go sprawdzić ale są błędy w załączniku widać.
A oto kod:

namespace GeometryServiceLibrary
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class GeometryService : IGeometryService
    {
        public double GetCircleArea(Circle circ)
        {
            return Math.PI * Math.Pow(circ.Radius, 2);
        }

        public double GetRectangleArea(Rectangle rect)
        {
            return rect.A * rect.B;
        }
    }
}

A Interfejs:

namespace GeometryServiceLibrary
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IGeometryService
    {
        [OperationContract]
        double GetCircleArea(Circle circ);

        [OperationContract]
        double GetRectangleArea(Rectangle rect);
    }

    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    // You can add XSD files into the project. After building the project, you can directly use the data types defined there, with the namespace "GeometryServiceLibrary.ContractType".
    [DataContract]
   // [KnownType(typeof(Rectangle))]
    public class Rectangle
    {
        [DataMember]
        public double A { get; set; }

        [DataMember]
        public double B { get; set; }
    }

    [DataContract]
   // [KnownType(typeof(Circle))]
    public class Circle
    {
        [DataMember]
        public double Radius { get; set; }
    }
}

W załączniku błąd, który się pojawia.
Pozdrawiam

0

Utwórz sobie jakiś projekt konsolowy na boku i tam testuj metody które nie są możliwe do przetestowania przy użyciu wcf client.

1 użytkowników online, w tym zalogowanych: 0, gości: 1