NetTcpBinding & mexTcpBinding sharing same port throws AddressAlreadyInUseException on upgrade to .net 4.5?

  Do you notice that your WCF NetTcp endpoint sharing port with a mexTcp endpoint fails to activate with a AddressAlreadyInUseException on upgrade to .Net 4.5? System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:[Port#]. This could happen if there is another application already listening on this endpoint or if you have multiple service…

0

HttpContext.Current.Request.InputStream property throws exception “This method or property is not supported after HttpRequest.GetBufferlessInputStream has been invoked.” or HttpContext.Current.Request.Forms parameters empty

In .net 4.5 WCF leveraged the buffer less input stream for scalability benefits. As a result when you try to access the HttpContext.Current.Request.InputStream property you may end up with the below exception, as the InputStream property tries to get you handle to the Classic stream as they both are incompatible. You may also see the…

4

WCF 4.5 transport and XmlDictionaryReaderQuotas values not honored on a machine with .net framework 4.0

In order to simply configuration a number of transport property defaults and XmlDictionaryReaderQuotas values were changed in WCF 4.5. For exact details about changes refer this link under topics “New Transport Default Values” and “XmlDictionaryReaderQuotas”. Note: These new defaults will be considered only if you deploy the WCF service on a machine with .net framework 4.5. If…

0

WCF service with aspNetCompabitilityEnabled=”true” fails to activate on a machine with .net framework 4.0 runtime but works fine on .net framework 4.5?

Do you see that a WCF service with aspNetCompabitilityEnabled=”true” works fine on a machine with .net framework runtime 4.5, but the same service fails to activate with the below exception on a machine with v4.0 runtime. Here is how you can solve this issue: The service cannot be activated because it does not support ASP.NET…

1

Add service reference adding empty reference.cs in MVC 4 projects of VS 2012

In VS 2012 MVC 4 projects, do you find an empty reference.cs file while adding a service reference to a WCF service using ‘Add service reference’ dialog? Here is what you can do about it: Check if your error tab shows some error like… Warning     1                 Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown…

12

Configuration binding extension ‘system.serviceModel/bindings/*’ could not be found error on upgrade to .Net 4.5 RTM

If you have a WCF service with netHttpBinding/basicHttpsBinding/udpBinding endpoint using the .net 4.5 RC bits and your service fails to activate with this error message on upgrading to .net 4.5 RTM bits, here is what you need to do.   Configuration binding extension ‘system.serviceModel/bindings/netHttpBinding’ could not be found. Verify that this binding extension is properly registered in…

8