Saturday, September 12, 2009

JayRock vs AjaxPro

Personally, I prefer AjaxPro. It gives you the flexibility of passing a dataset, and it also provides you a cleaner way to wrap the data you want to pass around. Check out AjaxPro here.

Passing custom classes to a web service

This article can help you: http://www.dalepreston.com/Blog/2005/02/passing-classes-from-webservices-part.html

Basically, you need to do the following in the file Refence.cs:

1) Delete any references to XmlIncludeAttribute
2) Qualify your classes with the correct namespace (if necessary)
3) Remove the custom class declaration (I had to do this since I already had the class defined in my VS solution. In other words, I had access to the custom class in both the client and server application).

The other option is to write the proxy classes yourself, but I didn't try this.

Thursday, September 10, 2009

Overloading web methods in Visual Studio 2005

It's really simple, you just need to replace

WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

with

[WebServiceBinding(ConformsTo = WsiProfiles.None)]
I found this information here.

Saturday, June 20, 2009

More on CC.NET

CC.NET is a really cool technology. Now that I have it running, I don't have to worry or spend time creating installers. It can do everything: compile your VS solution, run automated tests, obfuscate and lock the assemblies, and create an installer.

But what happens when you try to use CC.NET with a solution that has managed and unmanaged code (and more important, does not contain explicit dependencies between some projects)? The problem is that deven.com will not compile the projects in the solution in the correct build order. Eventually you will have to fix the VS solution and set up the correct dependencies, but there is a workaround. Just create a task for each project and CC.NET will compile the projects in that order. The drawback is that you may end up with quite a few tasks, depending on your project.

Wednesday, June 17, 2009

Setting up Cruise Control .NET

So I was setting up this application, which is really easy to do. I'd like to post some useful configuration snippets:

1) Adding several SVN repositories







2) Setting up several tasks










You can find more information on their website, but I found that some sections are not up-to-date.

Friday, April 24, 2009

Cross-thread operation not valid: Control 'Ctrl' accessed from a thread other than the thread it was created on

I though I would have to redesign part of the application, after all, this seems like a critical error. But if you come across this error, check out this link:

http://www.vcskicks.com/cross-thread.php

Delegates can fix it. The code below will help you (part of this code is from the website above).

 
private delegate void AddListBoxItemDelegate(object item);
... then copy this code inside your method...
if (this.InvokeRequired)
{
AddListBoxItemDelegateaddItemDel = new AddListBoxItemDelegate
(AddListBoxItem); //delegate
object[] parameters = { text }; //parameters
this.Invoke(addItemDel, parameters); //call
}

else

{
//code you want to execute
}

Saturday, January 3, 2009

Disabling controls during a postback

Have you ever wondered how to disable the controls in the UI when doing a postback? This is a way to give feedback to the user saying: "wait for the page to load/respond". There are other ways to give this kind of feedback, for example, by using a busy indicator. The article "Managing the User Experience in AJAX" shows how to handle the first situation:

msdn.microsoft.com/en-us/magazine/cc163319.aspx