.net (23)

Data bind simbols legend in Asp.Net

An overview for the code render blocks in Asp.Net : <%#   %>  –  to be used for databinding (es repeater rows etc). <% %>   – code render block, allow execution of inline expressio (es Response.Write(“something”); <%$ %>   – Expression used to bind external parameters. <%= %>  – Renders the content of the block. <%: %>  […]

EF Code first with MVC 3 scaffholding.

Here’s a sample of Code first and the MVC 3 scaffholding in action, in order to run it you’ll need the MVC 3 Tools Update extension and the Nuget package for MvcScaffholding. The schema is pretty simple: Dowload the source code.

Fiddler with an Asp.net site.

Fiddler is an Http monitor and it is very handy when it comes to analyze the traffic from and to your computer or more specifically if you want to list the connections made from and to your Asp.net website. It can even log and decrypt HTTPS calls. Here’s a guide on how to get it […]

Simple Lucene.net wrapper

Lucene.net is an excellent framework for implementing full text search into an application. I wrote a small wrapper to allow an easier usage of the library, it uses attributes on the class members you want to store in order to provide a strongly typed way to access the index. You can read the article here […]

Asp.net user authenticated after signout.

The Asp.net Membership relies on cookies to store the FormAuthentication ticket of a user, this means that we have to remove the cookie in order to signoff from our application. When an user is logged a cookie containing the encrypted ticket is stored on the client machine: public void CreateUserCookie(string username) { //Expiration of the […]

MARS Rover Exercise in C#

The Mars Rover simulation is one of the most popular tests spreaded by companies wich want to screen candidates with a pratical test. Here’s the requirements: ” The problem specified below requires a solution that receives input, does some processing and then returns some output. You are free to implement any mechanism for feeding input […]

C# Text Encoding and Transcoding in few steps

While developing on a tool that to allow user to enter a message in whatever language and to print it I discovered that I didn’t know enough about character encoding. Character encoding is is a set of unique rapresentations called character: they can be the 26 letters of the English alphabet or even the set […]

WF 3.5 and SendActivity issue.

I am working on some .net 3.5 workflows, I’ve read that a migration to the fourth version of the framework is strongly reccomended for reasons spacing from perfomance to a better integration with WCF. Anyway, I was not able to invoke a WCF having a basicHttpBinding, in order to get it working I had to […]

Increase message size in WCF

During the testing of a WCF service, for certain requests I started to get the following error : “The maximum string content length quota (8192) has been exceeded while reading XML data”. While on a classic asmx web service in order to specify the maximum lenght for a request with the tag <httpRuntime> in WCF […]

WCF – Merge WSDL in a single file

It can happen that old clients dislike the way WCF separate WSDL descriptors. By default, a WCF service contains the full WSDL in an external “link” specified by the wsdl:import directive. If I browse the following service http://localhost:8695/GiftMessageService.svc?wsdl i’ll get a description of the service (like ports, address) but nothing about the soap actions and […]