dotnet
Export Azure Resource Groups Templates
·220 words·2 mins
azure
devops
dotnet
powershell
One of the great things about Azure is the possibility to Export Azure Resource Groups Templates. Each template is a json file containing the exact configuration of the services you’ve provisioned in a Resource Group.
Using this templates you can treat your Infrastructure as code and repeatedly deploy your application during every stage of the application lifecycle in the same way, each and every time.
EasyAzureServiceBus: easy Service Bus 1.1 for Windows Server
·186 words·1 min
azure
dotnet
service bus
A couple of years ago I started to work with one of my clients to implement an on-premises Service Bus solution.
While investigating the options I discovered a nice library, EasyNetQ: an easy .NET API for RabbitMQ, which inspired me to create a very similar project to simplify the use of pub/sub messaging with Service Bus 1.1 for Windows Server.
Private Nuget Server responds with (405) Method Not Allowed while pushing or deleting a package
·70 words·1 min
dotnet
iis
So you’ve deployed your own private NuGet server to IIS but you get this annoying exception trying to push packages:
(405) Method Not Allowed
Well as stated in many web pages removing WebDAVModule does fix the issue, but be sure you add the configuration in the right section! (not in the elmah section) or the fix wont work!
Prepare your App for Windows Azure! Create a custom Configuration Manager!
·224 words·2 mins
azure
dotnet
When you deploy an application to Windowes Azure, your application configuration cannot be changed cause it becomes part of the distributed package.
So what can you do if you want to set some dynamic settings (i.e Connection String settings)?
First of all you must use the ServiceDefinition.csdef file and add the dynamic settings there.
netDumbster another .Net Fake SMTP server based on Dumbster
·52 words·1 min
dotnet
netdumbster
Today I’ve released netDumbster (http://netdumbster.codeplex.com/)
netDumbster is a .Net Fake SMTP Server clone of the popular Dumbster (http://quintanasoft.com/dumbster/)
netDumbster is based on the API of nDumbster (http://ndumbster.sourceforge.net/default.html) and the nice C# Email Server (CSES) writen by Eric Daugherty.
Hope it helps!!!
Update: netDumbster source code was moved to a GitHub repo: https://github.com/cmendible/netDumbster
NHibernate.Linq Issue when a query is executed having the same alias but with different associations paths
·94 words·1 min
dotnet
nhibernate
When running a query like the following:
var query = nhib-Arms.Where(a => a.LeftHand.Thumb.Length == 1 || a.RightHand.Thumb.Length == 1); Thumb alias was always taken as part of the a.LeftHand association path, therefore leading to wrong results.
I’ve worked on patch and test to fix this issue, so Thumb alias is once part of the a.LeftHand association path and once as part of the a.RightHand association path.
Running Apache behind an IIS server. .Net Solution
·266 words·2 mins
dotnet
apache
iis
Yesterday I had the challenge to redirect – rewrite an url from my public IIS7 server to an internal Apache server. For instance a request to http://www.mysite.com/app handled by IIS should be redirected (using a reverse proxy) to ; http://127.0.0.1:8080/app where the internal Apache is listening.
Trying to configure it with the new Application Request Routing (ARR) module from Microsoft was a disappointing task. Once installed, my server stopped serving pages, and I could not find a way to make it work.
Rhino Mocks Method ‘YYY' requires a return value or an exception to throw.
·164 words·1 min
dotnet
unit tests
Yesterday I found myself stucked with a strange exception while programming a unit test using Rhino Mocks.
Supose you have an interface like the following one.
public interface ITest { object Freak(); } You can try a mock like the following:
var test = MockRepository.GenerateMock(); test.Expect(t => t.Freak()).IgnoreArguments() .WhenCalled(x => x.ReturnValue = "THIS IS A RETURN VALUE") .Repeat.Any(); Calling test.Freak(); will result in a return value of “THIS IS A RETURN VALUE"
Officially now I'm part of xVal.WebForms developers team.
·35 words·1 min
dotnet
xVal
I’ve been working on xVal.WebForms for the last month, as a consecuence it’s Project Coordinator John Rummel has decided to add me as an official developer.
So now I’m on board. Thanks John.
xVal.WebForms Team.
xVal.WebForms, Validation Groups and CausesValidation Part II
·143 words·1 min
dotnet
aspnet
xVal
A friend came with two issues concerning my recent post about xVal.webForms ValidationGroups and CausesValidation support.
1.- Supress Validation was being rendered as many times as ModelValidators where in the page.
2.- When more than one ModelValidator control was in place, xVal.AttachValidator script options could be incomplete, specifically the valgroups, cause the loop through page collections was done in the OnInit method of the controls before the page control tree was complete.
xVal.WebForms, Validation Groups and CausesValidation
·201 words·1 min
dotnet
aspnet
xVal
In one of our recent projects we needed a behavior like the ASP.Net ValidationGroups and also be able to relay on the CausesValidation of all controls implementing IButtonControl interface control.
So the first issue I faced was that jquery-validate plugin version 1.5.1 (The one that xVal.WebForms uses) does not support grouping in an ASP.Net way. I found the solution to this first problem in this article: http://plugins.jquery.com/node/7044. I did some tests on worldspawn work and did not find any problem with the implementation.
Using xVal, CSLA.NET and DataAnnotations.
·138 words·1 min
dotnet
aspnet
xVal
I’ve been working for years with CSLA to create business layer objects. Recently I started using XVal 1.0 and XVal.WebForms 0.1 for client side validation.
I started enforcing our rules as DataAnnotations and also in CSLA AddBusinessRules() method. So if a property of type string was required I used a StringLength DataAnnotation and also a CSLA.Validation.CommonRules.StringMaxLength rule in our business object.
Upgrade xVal.WebForms 0.1 to use xVal.1.0 (Validation Summary Support)
·62 words·1 min
dotnet
aspnet
xVal
Recently I found out about xVal.WebForms project at CodePlex.com. Its a good implementation of XVal for ASP.Net WebForms made by John Rummell.
I missed Validation Summary support so I upgraded John’s code so it could work with XVal 1.0.
I submitted two patches modifying ModelValidator.cs and xVal.jquery.validate.js.
These changes are now part of the Trunk repository as you can see here:
Issue in non Generic Execute Method in DbLinq.Data.Linq.Implementation.QueryProvider
·149 words·1 min
dotnet
We’ve been working with DbLinq for a while now, at HexaSystems and recently using it together with Dynamic Linq and SQLite I programed a call to the Count method of a Queryable object as follows:
public static int Count(this IQueryable source) { if (source == null) throw new ArgumentNullException("source"); return (int)source.Provider.Execute( Expression.Call( typeof(Queryable), "Count", new Type[] { source.ElementType }, source.Expression)); } I noticed that when doing so against a DbLInq Table object the following method is called: