XmlSerializer compat switch

XmlSerializer class in .NET 4.5 uses reflection emit to improve the cold startup time of your application. If you happen to run into any compatibility issues on running your existing .NET 40 applications running on a machine with .NET runtime >= 4.5, then you might use the below compat switch in your config file to…

2

OWIN Startup class not detected

I’ve seen quite a lot of people running into the issue where their OWIN startup class is not detected. Here are some of the more common reasons why the OWIN startup class is not detected. Check if your IIS application pool is in Integrated mode. Note: Running of an OWIN middleware is supported only on…

22

FileLoadException on Microsoft.Owin when running on worker role

Do you happen to see FileLoadException when you try to run a OWIN application (SignalR or WebAPI) on a worker role project with the below message? System.IO.FileLoadException: Could not load file or assembly ‘Microsoft.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from…

4

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