CORS

Home/Tag:CORS

RESTfull WCF Service with CORS and JQuery and Basic access authentication

While developing an HTML5 mobile app I’ve become more and more in contact with Microsoft WCF Services to provide the app with data. So I’ve spent some more time to take a deeper look into the matter of WCF Services to resolve my issues with the HTML5 app communication taking into account the “Best practices”. But anyway, what came out of this project, you can see below. You'll also find the complete VisualStudio 2012 Solution as a download at the end of the article. Step 1. Create an basic WCF service and interface [ServiceContract] public interface IMyService { [OperationContract] [WebInvoke(UriTemplate = "/UpdateItems", Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] bool UpdateItems(IEnumerable items); [OperationContract] [WebInvoke(UriTemplate = "/Update", Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] bool Update(StatusItem item); [OperationContract] [WebInvoke(UriTemplate = "/Delete", Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] void Delete(int ID); [OperationContract] [WebGet(UriTemplate = [...]

By | 2017-04-22T13:27:35+00:00 September 5th, 2013|Allgemein, C#, JQuery, VS2012, WCF|Comments Off on RESTfull WCF Service with CORS and JQuery and Basic access authentication
Load More Posts