Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

WCF FAQ: Part 3 – 10 security related FAQ

, 3 Jun 2010
Ten security related FAQ.
WCFSourceCode.zip
WCFWindowsBasicHttpBinding
WCFWindowsBasicHttpBinding
Service1.svc
WCFWindowsBasicHttpBinding.csproj.user
bin
WCFWindowsBasicHttpBinding.dll
Properties
WebApp
WebApp.csproj.user
bin
WebApp.dll
Properties
Settings.settings
Web References
localhost
CompositeType.datasource
Reference.map
Service1.disco
Service1.wsdl
WCFWSHttps
WCFWSHttps
Service1.svc
WCFWSHttps.csproj.user
bin
WCFWSHttps.dll
Properties
WebApplicationConsumer
WebApplicationConsumer.csproj.user
bin
WebApplicationConsumer.dll
Properties
Service References
ServiceReference1
configuration.svcinfo
configuration91.svcinfo
Reference.svcmap
Service1.disco
Service1.wsdl
WebApplicationConsumer.ServiceReference1.CompositeType.datasource
WsHttpCertificates
WCFSecurity.zip
WsHttpCertificates
Service1.svc
WsHttpCertificates.csproj.user
bin
WsHttpCertificates.dll
Properties
WsHttpClient
WsHttpClient.csproj.user
bin
WsHttpClient.dll
Properties
Service References
ServiceReference1
configuration.svcinfo
configuration91.svcinfo
Reference.svcmap
Service1.disco
Service1.wsdl
WsHttpClient.ServiceReference1.CompositeType.datasource
WsHttpClientConsumer
WsHttpClientConsumer.csproj.user
bin
WsHttpClientConsumer.dll
Properties
Service References
ServiceReference1
configuration.svcinfo
configuration91.svcinfo
Reference.svcmap
Service1.disco
Service1.wsdl
WsHttpClientConsumer.ServiceReference1.CompositeType.datasource
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WCFWindowsBasicHttpBinding
{
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
    [ServiceContract]
    public interface IService1
    {

        [OperationContract]
        string GetData(int value);

        [OperationContract]
        CompositeType GetDataUsingDataContract(CompositeType composite);

        // TODO: Add your service operations here
    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Shivprasad koirala
Architect http://www.questpond.com
India India

I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small
E-learning company in India. We are very much active in making training videos ,
writing books and corporate trainings. Do visit my site for 
.NET, C# , design pattern , WCF , Silverlight
, LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server  training 
and Interview questions and answers


| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 4 Jun 2010
Article Copyright 2009 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid