Register now!
Learn about the future of Silverlight from Corporate Vice President, Scott Guthrie and other experts, direct from Microsoft’s HQ.
http://www.silverlight.net/news/events/firestarter/
If you are a INETA User Group Leader or INETA Country Lead er, please help us to deliver this message and spread it. Thanks!
A word of warning:
Don't do it :-)
I'm v.guilty for using all the latest technologies so a few weeks back I installed IE9 Beta.
Problems encountered:
MVC2 projects getting 404 a lot, I did see this discussed in an interview with Phil Hack and there was a debate on wheather IE9 was just too fast for MVC2.... do you buy it??
Also I've been having problems with the editor I use to write my blog posts, been using raw html as it just didnt work, tonight i tried and compatibility mode and it works again :-)
What have I gained... nothing new that i'm using.... until I get some time to run through HTML5 (on a months holiday from work, wedding next week and putting final touches on the new house... time constraints ey! )
There are a few options when restricting what properties of a type get automatically bound by the framework.
Take the Loler type seen in my other MVC2 blog posts.
[code:c#]
[Bind(Include="ID,Name,Description")]
public class Loler
{
//entity framework generated
}
[/code]
Notice only the ID Name and Description properties will be bound by MVC Framework.
Per Usage restriction
[code:c#]
UpdateModel(loler, new[] { "ID", "Name", "Description" });
[/code]
Action method restrictions
[code:c#]
[HttpPost]
ActionResult Create([Bind(Include="ID,Name,Description")] Loler loler)
{
// implementation
}
[/code]
Below are two screenshots of two alternative mechanisms for handling a MVC2 post.
Take some time to explore the new vs2010 debugger.
Those of you to have experience with multithreading know that it can be a right old PIA (and i'm not talking Primary interop assembly here!).
Try the parallel tasks/stacks in vs2010 and see just how valuable a friend they become :-)
In recent times, CPU clock speeds have stagnated and manufacturers have shifted their focus to increasing core counts.
This is problematic for us as programmers because our standard single-threaded code will not automatically run faster as a result of those extra cores.
Spend some time investigating the new Tasks in .net 4.0

A quick sample of how to use linq in your webpages
[code:c#]
<% Model.ToList().ForEach(item =>
{ %>
<tr>
<td>
<%: Html.ActionLink("Edit", "Edit", new { id = item.AlbumId })%> |
<%: Html.ActionLink("Delete", "Delete", new { id = item.AlbumId })%>
</td>
<td><%: Html.Truncate(item.Title, 25)%></td>
<td><%: Html.Truncate(item.Artist.Name, 25)%></td>
<td><%: item.Genre.Name%></td>
</tr>
<% }); %>
[/code]
I said quick ey! :-)
So you've started up your very first 4.0 Workflow application.
You've added some arguments and want to know how to pass some information..
You can either use the Dictionary approach that exists since 3.0 or you can use the properites you've just created.
Thes scrren shots show a simple workflow with an input string UserName and an output string Greeting.

I added an assignment activity and set the "To" to be the output Arguement "Greeting"
And set the Value as follows.

To prove this works I've added a test fixture and implemented it as follows

So there you go. The quickie for today 
A sample of using SyncronizationContext to post a message back to the UX thread
[code:c#]
private void Window_Loaded(object sender, RoutedEventArgs e)
{
SynchronizationContext ctx = SynchronizationContext.Current;
ThreadPool.QueueUserWorkItem(_ =>
{
WebClient client = new WebClient();
string html = client.DownloadString("https://www.briankeating.net");
ctx.Post(state =>
{
tbDetails.Text = (string)state;
}, html);
});
}
[/code]
Hi All,
Been a while since I've writen some posts, been pretty hectic hours at work and weekends building a house so my chances to blog have been limited.
I intend over the coming few days to give a few tips and tricks on MCV2.
Here's on gottya..
Be carefull how you name your formal arguements in your controller functions.
You can see from the screenshot below that I created two args, "Name" and "name"
By default the first matching case insensitive value will be applied to both variables by MVC...
Usually this will be avoided by good naming conventions but be carefull nonetheless :-)

http://url/abc.svc .svc at the end of url makes it user unfriendly. It also makes it Low REST service as it donot follow the REST URI principle.
Till date developers have to overcome this limitation by implementing URLReWrite module in IIS.
Writing custom code to implement this is error prone and needs maintenance over a period. WCF 4.0 has introduced
a feature to access WCF services using attribute called as relativeAddress.
Following .config setting depicts how a Calculat
orService can be accessed using relative URL.
<system.serviceModel>
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress="/Payment" service=“CalculatorService.svc"/>
</serviceActivations>
</serviceHostingEnvironment>
</system.serviceModel>
**UPDATE
I've just tried to do this in an application I was working on, don't know where I got my origional information from but this Fileless activation was not what was advertised at the time, it requires a .svc extension on the url without the need for for a .svc physical file.
I've accomplished my restful approach with routing.