wcf

“Unable to connect to the remote server”

两盒软妹~` 提交于 2020-02-02 04:49:27
问题 I'm able to call a 3rd party vendor's web service from a Windows form program just fine. When I try to call the same web service and web method and same URL from a WCF web service I get the following error: ExportValuationPolicyNumber:Exception=System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because

ASP.NET Identity 2.0 decrypt Owin cookie

 ̄綄美尐妖づ 提交于 2020-02-02 03:14:10
问题 I'm working in a server-side application where I'm applying multi tenancy. In this server side I have a Backoffice ( ASP.NET MVC ) and a BackEnd ( WCF ). I want to decrypt Identity cookie so that I can check that it is valid and use it to auth in WCF Services. To be more specific I really want to know if ASP.NET Identity API provides any kind of service like the following example (it would work if I was using forms Authentication) FormsAuthenticationTicket formsTicket = FormsAuthentication

Ninject WCF Extension ArgumentNullException using NET.TCP Binding

允我心安 提交于 2020-02-02 00:30:48
问题 I have a WCF 4 service with 2 endpoints configured to use wsHttpBinding and netTcpBinding. I am hosting the service within IIS 7.5 using WAS and am using the Ninject WCF extension to DI into my service. My service works fine when I use the wsHttpBinding endpoint to call my service but fails when I use the netTcpBinding. When I look in my Application Event Log I get the following error outlined below. I have tried debugging the problem in VS2010 but am getting nowhere fast with this. I don’t

The provided URI scheme 'https' is invalid; expected 'http'.Parameter name: via

痞子三分冷 提交于 2020-02-01 12:22:37
问题 I have use below below configuration without "https". Now url changed to "https" . But I am getting "The provided URI scheme 'https' is invalid; expected 'http'.Parameter name: via" error while calling it. <system.serviceModel> <bindings> <basicHttpBinding> <binding name="ERightsPortBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536

The provided URI scheme 'https' is invalid; expected 'http'.Parameter name: via

[亡魂溺海] 提交于 2020-02-01 12:18:46
问题 I have use below below configuration without "https". Now url changed to "https" . But I am getting "The provided URI scheme 'https' is invalid; expected 'http'.Parameter name: via" error while calling it. <system.serviceModel> <bindings> <basicHttpBinding> <binding name="ERightsPortBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536

It is possible to communicate to windows service from WCF

限于喜欢 提交于 2020-02-01 05:49:04
问题 I am bit new to windows services . I have WCF service running on one machine(machine 1) and windows service running on another machine(machine 2). I need to I need to do run a powershell script on machine 2 using the WCF service. I have no idea where to start and how to accomplish this. Further more I need to pass a message from WCF web service to Windows Service Please advice me or provide some good example or tutorial. EDIT I want to run a powershell script on machine 2. This powershell

How to generate a wsdl file of a wcf service library project?

☆樱花仙子☆ 提交于 2020-02-01 04:34:05
问题 I have a few Wcf service library projects (not Wcf service application) in my solution. I have to give the .wsdl files of the projects to my collegue who will consume the services. How can I do that? Thanks in advance, 回答1: You can use the WCF Service Host to start a new instance of your service, and then add ?wsdl to the service address to access the wsdl ( http://localhost:1234/MyService.svc?wsdl for instance). WcfSvcHost's syntax is the following: WcfSvcHost.exe /service:<PathToServiceDLL>

When to use byte array, and when to use stream?

筅森魡賤 提交于 2020-02-01 03:08:05
问题 I need to send images and small video files (around 5MB, less than 10MB) to a REST service, which I will write. I am wondering whether I should use Byte[] or Stream to accomplish this task. What would be the dividing line in terms of transfer file size between using Byte[] and Stream? 回答1: The amount of free memory you're willing to commit to the transaction is your only real constraint. If you have a 5M file, then you'll need to load the entire thing in to RAM, which will cost 5M. If you

Checking file type from base64?

心不动则不痛 提交于 2020-01-31 16:56:59
问题 I have a WCF REST Service with the following OperationContract that saves files on the disk: [OperationContract] [WebInvoke(UriTemplate = "FileSave", Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)] ResponseHandler FileSave(string fileName, string fileContent); Files are sent through javascript - using HTML File API => binary data => base-64 encoded ASCII string (=fileContent is recieved in the

Checking file type from base64?

╄→гoц情女王★ 提交于 2020-01-31 16:52:05
问题 I have a WCF REST Service with the following OperationContract that saves files on the disk: [OperationContract] [WebInvoke(UriTemplate = "FileSave", Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)] ResponseHandler FileSave(string fileName, string fileContent); Files are sent through javascript - using HTML File API => binary data => base-64 encoded ASCII string (=fileContent is recieved in the