Posts

SSL problem when installing TFS 2010

I had this error when trying to install TFS 2010 Beta 2 on a shiny new Windows Server 2008 R2 : TFxxxxxx: SQL Server Reporting Services is configured to require a secure connection, however no HTTPS URL is configured with a valid certificate So first thing was to remove the SSL binding from the report server (using the Reporting Services Configuration Manager), but it did not change anything from the TFS configuration checker point of view. The fact is this checker does not care about whether SSL is actually in use for the report server, it simply checks IF SSL can be enabled in the report server. That means that you must completely disable SSL and this can only be done by modifying the .config file of the report server. Just navigate to your report server folder (usually \MSRS10.MSSQLSERVER\Reporting Services\ReportServer), open the rsreportserver.config file for editing and locate the parameter named SecureConnectionLevel and set its value to 0 to deactivate security). Re-run ...

Entity Framework 4.0 and POCO

One of the thing that annoyed me most in Entity Framework 1.0 was the lack of support for POCO. I like to use a specific vertical layer for entities, and I like those entities to have only properties and to be POCO to say it simply. The problem in EF 1.0 is that entities are forced to inherit from a class. I could also use the IPOCO interfaces but it was a lot of code for little benefit. The great thing I love in EF 4.0 (even if it is a beta) is that I can generate the edmx file without generating the classes. So basically, I have a EDMX file containing all the XML stuff (conceptual model, physical model and mappings) and I create my classes that Object Services will use. That way, I can put real POCOs in my entity layer. This is an entity that I can create and use with EF (and the corresponding EDMX) : public class Client { public int ID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public Address Address { get; set; } } EF wi...

WCF tuning tips

To obtain significantly better response time and decreased the load on the service, you apply a set of best practices depending on your needs. 1. If you do not need sessions in your services, you may want to disable them to reduce the memory consumption of the service. 2. If you are transfering large amounts of data between client and server, the minimum is to enable MTOM enconding. MTOM is an optimized encoding for transmitting binary data. And even better than MTOM, you can also use streaming for the data transfers. Streaming avoids loading the complete message in memory which is what happens when you do not use streaming. Performance will be vastly increased when dealing with large amounts of binary data. 3. If you have control over client and server, you may also want to choose a more efficient but less interoperable binding (like NetTcpBinding for example). This will avoid the overhead that comes with all the WS-* protocols. 4. Be carefull when modifying the instance and concurren...

Databinding and XtraReport

I had a problem recently using object data sources in my XtraReports. I was assigning an object hierarchy to the DataSource property and was getting weird exceptions. The problem is XtraReport does not handle well one object as a data source, it prefers to have a collection of objects. The simple fix was to use a BindingSource as the data source and assign my object to the BindingSource's DataSource property. And yes, I should have been using a BindingSource from the start, I know :)

Some news about EF 4.0

The ADO.NET team posted a list of the upcoming features of Entity Framework 4.0. We will get automatic lazy-loading, POCO and much more. This is definitely something you want to read. Click on the title to read the complete article.

400 Bad Request when trying to add a Web Reference

This morning, I had a hard time adding a Web Reference in my CF application pointing to a WCF service. I checked the service several times, re-built it several times as well, but each time I got a HTTP 400 Bad Request when clicking the "Go" button of the Add Web Reference wizard. And then, I copied/pasted the URL one more time deleting the mex part at the end but leaving the ending slash. And it worked. I had removed the ending slash and thus caused this annoying behavior. I lost 5 minutes over such a stupid problem... Hope it will help one of you someday :)

Accessing a WCF service using Compact Framework

A few constraints when connecting to a WCF service from a Compact Framework application : The binding must be set to basicHttpBinding, CF does not know what to do with a wsHttpBinding. The XmlSerializerFormat attribute must be set on the service contract, the default WCF serialization is not suitable for the CF. It would throw an exception when deserializing. Make sure you configure your endpoints correctly, "localhost" is not accessible from the mobile device (emulated or not), you can use ppp_peer as the hostname in the CF WCF proxy (a lot of CFs, I know). Happy CF coding :)