Extracting property name at compile time
protected string ExtractPropertyName<T>(Expression<Func<T>> propertyExpression) { if (propertyExpression == null) { throw new ArgumentNullException("propertyExpression"); } var memberExpression = propertyExpression.Body as MemberExpression; if (memberExpression == null) { throw new ArgumentException("The ...You have been a thorn in my side...
....for far too long, Avatar.
Yes, I've finally bought it, but I don't want to talk about it (moreover I'm still too much involved in Skyrim, I haven't even launched the game....).
The real leitmotiv today is Videum! I did it....at last.
4 months of hard work, far from being complete but hey, just take a look: it's my baby :D
Why I love and hate IIS7
Yeah, I missed you too guys.
Anyway, this took me a while to find out. But things like these are exactly what makes my job a continous research for enlightenment.
In a nutshell, seems that in IIS7 there's a different way to setup httpHandlers. And I'm not referring to the simple change of parent node in the web.config ( from <system.web> <httpHandlers> to <system.webServer> <handlers> ).
As many of you have probably already noticed, the handler tag now has a new name attribute. Yeah, an ...
Visual Studio + Webservices + SOAP Headers
Suppose you have to consume a Webservice that requires you to provide a custom header. If you generate automatically the proxy with Visual Studio, you'll soon discover that there's no way to add an header or to access the SOAP request.
Ok, here's what you have to do:
1) download the Web Services Enhancements 3.0 and reference microsoft.web.services3.dll in your project
2) change the base class of your proxy from System.Web.Services.Protocols.SoapHttpClientProtocol to Microsoft.Web.Servic...
WCF + Console Application
Suppose you have a nice Console Application. Suppose you want to host a WCF service. And suppose you want to create a fancy Silverlight app that consumes this WCF service.
You'll soon discover that something isn't working as expected...long story short, the client app is looking for a ClientAccessPolicy.xml file. And why in the world shouldn't we provide it?
Here's what you have to do:
1) Create another WCF Service, call it CrossDomainService
2) Add this method:
[OperationContrac...

