wcf

How to configure Windows authentication for custom binding in WCF service?

帅比萌擦擦* 提交于 2021-01-29 04:06:24
问题 I need to use Windows authentication in my application along with claim-based authorization using Windows Identity Foundation. I have used following configuration for my service. <system.identityModel> <identityConfiguration> <claimsAuthorizationManager type="Framework.Authorization.AuthorizationManager, ClaimsAuthorizationService"/> </identityConfiguration> </system.identityModel> <system.serviceModel> <bindings> <customBinding> <binding name="CustomTcpBinding" maxConnections="50"

WCF over HTTPS with PHP throws “Method Not Allowed” exception

老子叫甜甜 提交于 2021-01-29 03:22:34
问题 I've created a .NET WCF service that is intended to always be over HTTPS. When I first created the service skeleton and ran it over HTTP, it worked fine. I used PHP5 to test the interoperability with the built in SOAP functions. However, once I switched to HTTPS, when I try to call the function from PHP, I get a fault back with the message "Method Not Allowed" and the fault code of "http." It does allow me to retrieve the list of methods though. The error occurs when it calls the method "Test

WCF over HTTPS with PHP throws “Method Not Allowed” exception

会有一股神秘感。 提交于 2021-01-29 03:19:15
问题 I've created a .NET WCF service that is intended to always be over HTTPS. When I first created the service skeleton and ran it over HTTP, it worked fine. I used PHP5 to test the interoperability with the built in SOAP functions. However, once I switched to HTTPS, when I try to call the function from PHP, I get a fault back with the message "Method Not Allowed" and the fault code of "http." It does allow me to retrieve the list of methods though. The error occurs when it calls the method "Test

Webconfig overrides for Azure Cloud Services

醉酒当歌 提交于 2021-01-29 02:12:53
问题 I have a database connectionstring in my Azure cloud service's web role web.config. While developing this is pointing to localhost, but when deployed I want to point my production database. With azure websites you can override web.config settings and connectionstrings using the azure portal but how do I do this with cloud services? Also, in the new azure portal, it says Cloud Services (classic) , does this mean deprecated? Should I be using a newer azure feature for hosting my soap/rest

Programmatically selecting an Item in a ListBox

有些话、适合烂在心里 提交于 2021-01-28 21:55:53
问题 I have three ListBoxes ( CompanyName , Representative & QuoteNumber ) and I load data from my WCF client, into the CompanyName list box using the method below: private async Task LoadCompanies() { using (TruckServiceClient client = new TruckServiceClient()) { var companies = await client.GetCompaniesAsync(); foreach (var company in companies) lbxCompanyName.Items.Add(new ListBoxViewItem<Company>(company)); } } Now in the coding below I allow myself to select the Company Name in the

Private Azure Cloud Service?

谁说胖子不能爱 提交于 2021-01-28 19:40:54
问题 In a microservice architecture it's quite common to have tens of "internal" services, i.e. those services that are only intended to be called by other services in the architecture and not publicly accessible. We're very happy with Azure Cloud Services (web and worker roles) and all the nice PAAS deployment benefits they bring. We'd like to develop several internal microservices as Azure Cloud Services but at the same time avoid having to add custom application security code to them (OAuth etc

IClientMessageInspector BeforeSendRequest method is not working when setting header using OperationContextScope

时光怂恿深爱的人放手 提交于 2021-01-28 18:45:55
问题 I have a client code implementation to consume a service with IEndpointBehavior to track request and response data. everything was working fine till I implement bearer token using OperationContextScope. var httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers[System.Net.HttpRequestHeader.Authorization] = "Bearer " + accessToken; var context = new OperationContext(client.InnerChannel); context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] =

ASP.NET Core making SOAP API request with WCF client how to add a Cookie header to the request?

∥☆過路亽.° 提交于 2021-01-28 11:41:00
问题 So I am currently working on making SOAP API request to a service with WCF generated code "Client object", I am wondering how to set the Cookie header to the request? 回答1: In general, we add the custom HTTP header by using HttpRequestMessageProperty . Please refer to the below code. ServiceReference1.ServiceClient client = new ServiceReference1.ServiceClient(); try { using (OperationContextScope ocs=new OperationContextScope(client.InnerChannel)) { var requestProp = new

Error 0xc00e0003 in MSMQ + WCF inside a Windows Service

狂风中的少年 提交于 2021-01-28 07:46:28
问题 I am hosting a WCF Service, that uses MSMQ, inside a Windows Service. Problem: After installing the service, I am unable to start the service. Event log has following information: Service cannot be started. System.InvalidOperationException: There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information. ---> System.ServiceModel.MsmqException: An error

DataContractSerializerSettings Class Examples

痴心易碎 提交于 2021-01-28 05:30:27
问题 I am looking for example on how to use the DataContractSerializerSettings class. There are two specific properties I am interested in RootName RootNameSpace. Can I use them in my code to set the namespace in the output xml? 回答1: If you're creating the DataContractSerializer , then yes. You can create a DataContractSerializerSettings object and set the RootName and/or RootNamespace using an XmlDictionary to create the XmlDictionaryString s. Here's an example: var settings = new