Web.Config - create WCF REST Service and host in Windows Azure
2012-08-14 21:43
525 查看
In contract PlayerData is namespace and IService1 is ServiceContract we created in previous step. Finally configuration will be as below,
This is what all we need to do to create a WCF REST Service to be hosted on Windows Azure. Press F5 to run and test WCF Service Web Role in local development fabric. Make sure that you have set Windows Azure project as startup project.
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="servicebehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="restbehavior"> <webHttp/> </behavior> </endpointBehaviors> </behaviors> <services> <service name ="PlayerData.Service1" behaviorConfiguration ="servicebehavior" > <endpoint name ="RESTEndPoint" contract ="PlayerData.IService1" binding ="webHttpBinding" address ="" behaviorConfiguration ="restbehavior"/> </service> </services> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel>
This is what all we need to do to create a WCF REST Service to be hosted on Windows Azure. Press F5 to run and test WCF Service Web Role in local development fabric. Make sure that you have set Windows Azure project as startup project.
相关文章推荐
- How to create, host, test and consume a WCF Web Service
- [Windows Azure] Create and use a reporting service in Windows Azure SQL Reporting
- c# - Create ServiceEndpoint in code and in config
- Create an ASP.NET web app in Azure App Service
- Difference between WCF and Web API and WCF REST and Web Service[转]
- Windows Azure:Host WCF Service in Azure Worker Role
- The difference between Web role and Worker role in windows azure platform
- Difference between WCF and Web API and WCF REST and Web Service
- How to create simple web service in VS2010, NOT WCF service
- Why the same files are copied to /Approot and /Siteroot in Windows Azure WebRole?
- Difference between WCF and Web API and WCF REST and Web Service
- web.config in WCF Rest
- Difference between WCF and Web API and WCF REST and Web Service
- Windows Communication Foundation and RESTful Web Services Primer(教你制作rest wcf)
- How to: Host a WCF Service in a Managed Windows Service
- How to create (and deploy) a windows service in C# ?
- Hosting WCF Services in Windows Activation Service {转载}
- Agent and Web Service Technologies in Virtual Enterprises
- How to change service accounts and service account passwords in SharePoint Server 2007 and in Windows SharePoint Services 3.0(Se
- Host WCF Service in WAS