This could be due to the service endpoint binding not using the HTTP protocol

I think there is serialization problem, you can find exact error just need to add below code in service config in <configuration> section. After config update “App_tracelog.svclog” file will create, where your service exist just need to open .svclog file and find red color line on left side panel which is error and see its … Read more

WCF vs ASP .Net Web API

First, I suggest you read my post on the subject: http://blogs.microsoft.co.il/blogs/idof/archive/2012/03/05/wcf-or-asp-net-web-apis-my-two-cents-on-the-subject.aspx Regarding your WSDL question – since the WebApi does not use SOAP, it does not require a WSDL, and does not export one. You can use Hypermedia to return resources with a list of possible activity URLs (think of it as a self-describing resource)

Why should a developer use web services instead of direct connections to a db? [closed]

Security. You’re not granting DB access to anyone but web server/app user. This is extra important when you have tons of users. You avoid the pain of user/role maintenance on DB side. DB load reduction. Web service can cache the data it retrieved from DB. Database connection pooling (hat/tip @Dogs). A web service can use … Read more

WCF Service , how to increase the timeout?

In your binding configuration, there are four timeout values you can tweak: <bindings> <basicHttpBinding> <binding name=”IncreasedTimeout” sendTimeout=”00:25:00″> </binding> </basicHttpBinding> The most important is the sendTimeout, which says how long the client will wait for a response from your WCF service. You can specify hours:minutes:seconds in your settings – in my sample, I set the timeout … Read more

How to use a WSDL file to create a WCF service (not make a call)

Using svcutil, you can create interfaces and classes (data contracts) from the WSDL. svcutil your.wsdl (or svcutil your.wsdl /l:vb if you want Visual Basic) This will create a file called “your.cs” in C# (or “your.vb” in VB.NET) which contains all the necessary items. Now, you need to create a class “MyService” which will implement the … Read more

How do I pass values to the constructor on my wcf service?

You’ll need to implement a combination of custom ServiceHostFactory, ServiceHost and IInstanceProvider. Given a service with this constructor signature: public MyService(IDependency dep) Here’s an example that can spin up MyService: public class MyServiceHostFactory : ServiceHostFactory { private readonly IDependency dep; public MyServiceHostFactory() { this.dep = new MyClass(); } protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) … Read more

How to use Fiddler to monitor WCF service

You need to add this in your web.config <system.net> <defaultProxy> <proxy bypassonlocal=”False” usesystemdefault=”True” proxyaddress=”http://127.0.0.1:8888″ /> </defaultProxy> </system.net> then Start Fiddler on the WEBSERVER machine. Click Tools | Fiddler Options => Connections => adjust the port as 8888.(allow remote if you need that) Ok, then from file menu, capture the traffic. That’s all, but don’t forget … Read more