Archives
-
Update on ASP.NET Vulnerability
Scott Guthrie updated his blog with more info about the ASP.NTE Vulnerability, check it out here: http://weblogs.asp.net/scottgu/archive/2010/09/24/update-on-asp-net-vulnerability.aspx
-
Vulnerability in ASP.Net
I would recommend all of you who are managed ASP.Net application to read this:
-
Make sure the web.config pages/namespace can be used together with ASP.NET MVC 3 P1 and Razor
Note: This blog post is based on the ASP.NET MVC 3.0 Preview 1.
-
ASP.Net MVC 3.0 Preview 1, Razor and nested master pages
Note: This blog posts is based on the ASP.NET MVC 3.0 Preview 1.
-
UnitOfWork Action filter for ASP.NET MVC and nHibernate
-
Loading Strategy for Entity Framework 4.0
-
Integrate your blog or sites with ForkCan.com
If you didn't know, you can get the code you have posted on ForkCan.com and include it to your blog posts or sites. The following is an instruction (The Instruction itself is included from ForkCan.com):
-
ForkCan is now available public – Share, Discuss, Improve code etc
ForkCan is now available, you can read more about ForkCan here. If you have an idea of a code, or want to see if it can be improved, want to find code for your project etc or talk about code. Then ForkCan is a place for you..
-
What is ForkCan.com – Do you have what it takes to Share your code?
I have worked on a project for a while now, I call it ForkCan and can be found on the following URL www.forkcan.com. ForkCan is all about sharing code in a social way. I have notice that several developers on twitter paste pointers to sites like paste-it.net to share some code with others, and to get feedback on the code. I moved this a little bit further and created a similar site BUT! I also want to make sure developers can learn from each other, discuss the code with each other and much more. There are so many great code examples shared and distributed on the web, but to find them we need to search for it and it’s spread around different blog posts, forums etc. I wanted to create one place where developers can add the code, make a repository of codes where everyone can find great code to be used in a project. I also created ForkCan to save my own “good to have” code snippets, so I can find it easy and and copy and paste it into my projects. You may wonder why I call it ForkCan? It’s because it can be used as a can of forks ;) Fork in Software development is about taking an existing code and make development on it. So with ForkCan you can share your code, someone else can make it even better by making a Fork of it. The idea of ForkCan is to help each other to be better developers. The site also is a great tool for the Copy & Pasters.. ;)
-
Microsoft WebMatrix – Easy way to build ASP.NET Web Sites
Yesterday Microsoft announced WebMatrix, a tool to build standalone ASP.NET Pages using the new Razor view eninge. With WebMatrix developers will get the new IIS Developer Express and SQL Compact Edtition.
-
“Razor” the new ASP.NET View Engine
Because of my work with the www.forkcan.com and the traveling around Sweden talking about ASPEN a Silverlight 4, MVVM, RIA Services, Unity 2.0, MEF application I haven’t spend so much time with blogging.
-
Design by Contract with Microsoft .Net Code Contract
I have done some talks on different events and summits about Defensive Programming and Design by Contract, last time was at Cornerstone’s Developer Summit 2010. Next time will be at SweNug (Sweden .Net User Group). I decided to write a blog post about of some stuffs I was talking about.
-
Why should I need to waste so many resources and 1-3 minutes to get started?
Every time I start my computer, I do the following:
-
Use Extension method to write cleaner code
This blog post will show you step by step to refactoring some code to be more readable (at least what I think). Patrik Löwnedahl gave me some of the ideas when we where talking about making code much cleaner.
-
MVVM, Data Channel, MEF, WCF RIA Services and ViewModel Locator – Silverlight 4.0
In the Aspen project I decided to use a ViewModel locator to find the ViewModel a View should use, I also use MEF for composition of parts. In this post I’m going to write about the MVVM implementation we use in the Aspen project, but first about the Data Channel used in Aspen.
-
The Aspen progress – Silverlight 4, Net 4, WCF RIA Services ref. project
It was a while since I wrote a blog post, the reason are many, first preparation for the SDC2010 conference where I talked about WCF RIA Services, then 2 sessions at Microsoft TechDays 2010 where I talked about Web Form vs MVC and building business application with Silverlight 4, MVVM and WCF RIA Services.. and then bought a new car and also have bean on the Microsoft Visual Studio 2010 Ultimate tour and one week vacation in Italy. So a busy time. This blog post will only mention some of the latest updates we have made to the project.
-
Some steps for moving WCF RIA Services Preveiw to the RC version.
I moved the Aspen project from the WCF RIA Services VS2010 Preview to the RC version. Maybe some of you will move your Preview version to the RC, so I wrote down some steps..Server SideYou can start with replacing the Web.Config, because I don’t know how your config looks like, I just copy a clean PDC preview config and paste it here and the new one for the RC
Old one:<?xml version="1.0"?>
<configuration>
<system.web>
<httpModules>
<add name="DomainServiceModule" type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="DomainServiceModule" preCondition="managedHandler"
type="System.Web.Ria.Services.DomainServiceHttpModule, System.Web.Ria, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer><system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
</configuration>New one:
<configuration>
<configSections>
<sectionGroup name="system.serviceModel">
<section name="domainServices" type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" allowDefinition="MachineToApplication" requirePermission="false" />
</sectionGroup>
</configSections><system.web>
<httpModules>
<add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
<compilation debug="true" targetFramework="4.0" />
</system.web><system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
<add name="DomainServiceModule" preCondition="managedHandler"
type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
</system.webServer><system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>You can see all the changes by comparing both of them. I just made a simple copy and paste of the whole file in the Aspen project.On the server-side the following assembly references need to be replaced:Replace:System.Web.DomainServicesTo:System.ServiceModel.DomainServices.ServerLocated in the following folder (depends where your SDK is installed):C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server
Then replace the System.Web.DomainServices namespace to System.ServiceModel.DomainServices.Server
Replace the following assembly references:
System.Web.Ria
(and System.Web.Ria.Services)
To:
System.ServiceModel.DomainServices.Hosting
System.ServiceModel.DomainServices.Server
The EnableClientAttribute is located in the Hosting assembly now.
Then replace the System.Web.Ria namespace to System.ServiceModel.DomainServices.Hosting.
For the Invoke-, Insert, IgnoreAttribute etc, replace the System.Web.Ria.Services namespace with System.ServiceModel.DomainServices.Server.Note: I don’t use LinqToEntitesDomainService, but I guess if you do, then you need on the server side add a reference to the assembly:System.ServiceModel.DomainServices.EntityFrameworkThe LinqToEntitesDomainService is located in the following namespace: System.ServiceModel.DomainServices.EntityFrameworkClient-Side:Replace:
System.Web.Ria
To:
System.ServiceModel.DomainServices.Client
System.ServiceModel.DomainServices.Client.Web
Located in the folder (depends where your SDK is installed):
C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Silverlight
Add a reference to the following assembly:
System.ServiceModel.Web.Extensions
(This assembly is not in the SDK folder; use the .NET Tab in the Add Ref. dialog)Remove the old “Generated_Code” folder and rebuild your solution.
If you want to know when I publish a new blog post, you can follow me on twitter: http://www.twitter.com/fredrikn -
WCF RIA Services Silverlight Business Application – Using ASP.NET SiteMap for Navigation
Note: This blog post examples is based on the WCF RIA Services PDC Beta and WCF RIA Services VS 2010 Preview, changes to the framework may happen before it hits RTM.
This blog post will be about using the ASP.NET SiteMap together with WCF RIA Services and the Navigation feature added to Silverlight. I assume you are familiar to how the Navigation feature will work when reading this blog post, even if you don’t know you may find this blog post interesting. -
WCF RIA Services and Audit – Historical changes
Note: The examples in this blog post is based on the WCF RIA Services PDC Beta and VS2010 Beta Preview, and changes to RIA Services can be done until it hits RTM.
-
Looking for great .Net developers – Where are you all?
Never done this kind of post before I don’t like to do write post like this one, but I have too.. I need more .Net developers! If you are interested to work as an consultant in Sweden and in the city of Gothenburg (to begin with), and have at least 4-5 years of experience of building .Net based apps, and your life is all about learning new stuff, and like to improve your self when it comes to write good code, good software etc. Please contact me ASAP! I prefer people that are self learned (but others are of course welcome), so you don’t need to have just a paper with some degrees that will not say anything in this fast moving forward evolution ;)
-
Aspen – part 7 of X – Entity Validations
Dag König and I had a meeting today about the Aspen project. We talked most of the time about validations and how we should implement it. I decided to post about the current decision made.
-
Aspen – part 6 of X – Reusing ObjectContex among Repositories during a DomainSerivce operation.
(I had to shorten the title down a bit ;))
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 5 of X – New Repository implementation
This will be quite small blog post but the time is running out and I have to go to bed. But I wanted to let you know what I’m working on at the moment in the “Aspen” project.
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 4 of X – DomainService, using DTO and Unity
Note: The code in this post is based on the VS 2010 Beta 2, and changes can be made until it hits RTM.
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 3 of X – Repository implementation
Note: The example code in this blog post is based on the VS2010 Beta 2, changes can be made until VS2010 hits RTM.
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 2 of X – MEF and EF 4 code-only
Note: The code examples in this blog post will be based on technical previews and betas of .Net 4.0 and VS2010. So changes can be made before it hits RTM.
-
Aspen – A sample app using Silverlight 4 and .Net 4.0 – part 1 of X
Together with Dag König and Danwei Tran at Microsoft, I’m building an app with the code name “Aspen”. This application will use most of the new features shipped with Visual Studio 2010, such as, Silverlight 4, Entity Framework 4, MEF, WCF RIA Services etc. We are going to use the MVVM pattern and a sort of Domain Driven Design (DDD) approach. Danwei is the GUI designer, she will use Sketchflow and Expression Blend 4. Dag König is the “Standards authority” and will also do some development. My part is to be a developer, both backend and client-side. I will blog about our progress on my blog and that is the reason for the X in the title of this blog post. I don’t know how many parts it will be ;)
-
Silverlight – About validation when binding to custom forms – Part 2 using Silverlight 4
In my first part about validation and binding to custom forms I wrote about how we could with some small hack enable the Validation Tooltip for a bounded control manually when we press a button. In this post I will instead use Silverlight 4 with Commanding and the INotifyDataErrorInfo interface to “manually” show the validation tooltip for a specific control.
-
Silverlight – About validation when binding to custom forms
I have notice that some people have problems about how to implement User Input validation when they don’t use controls like the DataForm or DataGrid etc, and instead bind directly to a TextBox or other user input controls. In this post I will write about different ways to handle validations. In this post I will work with a simple View. I will later add a post where I will use some new Validation features in Siverlight 4 and where I also use the MVVM pattern and Commanding.
-
Silverlight - Navigate to a specific Page using a Hyperlink
Sometimes I think it’s hard to know what I should write about, my ideas comes from different sources. Some of my posts is based on questions people are asking on forums. If someone ask one specific question, it’s a big chance that someone else have the same kind of question, so I often blog about the solution so others kind find them. So this blog post will be about how we can from a HTML page navigate to a page hosting a Silverlight application and navigate to a specific .XAML page. Probably someone else have blogged about this before but I also use my blog as a reference for my self :P
-
My first day at my new work
Today is my new day at my new work. I have now started to work for Iptor a .Net and Java consultant company in Gothenburg. My role will be coaching, mentoring, consulting and also as a instructor. My main role is to help companies with starting up new projects, helping them with architecture and design choice and make sure they use the correct tools for the correct task. The main focus will be everything from small web based and RIA apps to enterprise apps where I will spend a lot of time with Silverlight and of course other .Net frameworks. I will also work as an instructor to lift developers and architects to a reasonable level to succeed with the implementation of projects. Please don’t hesitate to contact me if you need any help with upcoming or existing projects.
-
Silverlight 4 - Make Commanding use lesser code
In my previous post about using Silverlight 4 Commanding, I got a question why I didn’t use delegates etc instead of creating a lot of ICommand classes. In this post I’m going to show how you can reduce the number of ICommand classes.