How to create a CSHTML and WebMatrix TweetMeme Helper

יום רביעי, יולי 7, 2010

How to create a CSHTML and WebMatrix TweetMeme Helper Microsoft has recently introduced the first beta of its new stack for building great web sites – WebMatrix. One of the key components of WebMatrix is the ASP.Net Web Pages “Razor” Syntax (or simply: CSHTML) that lets you write C# code inside the HTML markup. Helpers in WebMatrix Among the new possibilities and simplicity that this approach brings to people who build web sites, there is also the notion of Helper. Helpers are a way to use a single line of code for a common task that...

How To: Call a Java EE Web Service from a .Net Client

יום שבת, יולי 19, 2008

How To: Call a Java EE Web Service from a .Net Client Many organizations have server side investments in Java technologies. While they want to build a compelling UI with Microsoft’s latest technologies, such as WPF and Silverlight, they still want to benefit from those existing investments instead of rewriting them. In order to do so, we have to bridge between those technologies and allow client side technologies consume Java web services. This post is a step by step guide for building a Java EE Web Service, and a .Net client application that consumes it....
no comments

Visual Studio 2008 SP1: EntityDataSource for ASP.Net

יום שני, מאי 12, 2008

Visual Studio 2008 SP1: EntityDataSource for ASP.Net EntityDataSource is a new DataSource control for ASP.Net (just like ObjectDataSource and SQLDataSource and more recent - LinqDataSource) which makes declaratively binding ASP.NET UI controls to Entity Data Models very easy. In this post I will build a simple web application that uses EntityDataSource in order to demo how it is being used. 1. Create a simple Web Application, and create an initial GridView on it. <body>     <form id="form1" runat="server">     <h1>         Using the EntityDataSource</h1>     <asp:GridView runat="server" ID="GridView" />     </form> </body> 2. Create a new ADO.Net Entity Data Model. Add a new ADO.Net Entity Data Model item to...

SQL Server 2008 FILESTREAM – Part 1

יום שישי, מאי 9, 2008

SQL Server 2008 FILESTREAM - Part 1 SQL Server 2008 has a lot of new cool features that I've talked about before: SQL Server 2008 IntelliSense SQL Server 2008 T-SQL: DECLARE and SET in the Same Statement SQL Server 2008 T-SQL: Insert Multiple Rows SQL Server 2008 T-SQL: MERGE Statement One of the great features in SQL 2008 is it's FILESTEAM support. To make things short, we can now not only store the path to the file in our...
no comments

Compare .Net Assemblies with Framework Design Studio

יום חמישי, אפריל 17, 2008

Compare .Net Assemblies with Framework Design Studio Trying to keep up with all the Alphas, Betas and CTP's, I was looking for a tool that will help me to compare .Net assemblies so that I can easily spot what's new in each drop. Just when I didn't find a suitable tool and was about to write one for my self, I noticed Framework Design Studio, by Krzysztof Cwalina, Hongping Lim and David Fowler. From the Framework Design Studio Home Page: "Framework Design Studio is a set of tools for reusable library designers....
no comments

ADO.Net Data Services Part 1 – Building a Simple Web Data Service

יום רביעי, דצמבר 12, 2007

ADO.Net Data Services Part 1 - Building a Simple Web Data Service This post is part of my Get Started with ADO.Net Data Services post series. This post is a step by step guide for building a Simple Web Data Service for the Blog database I posted in the last post. 1. Create a new standard ASP.Net Web Application. Notice that there is no special project template for a Web Data Service, and later we will see the new item template. In this guide, I called my web application BlogWebApp.   2. Create the...

How To: Create a RSS Syndication Service with WCF

יום שני, דצמבר 3, 2007

How To: Create a RSS Syndication Service with WCF This post is a step by step guide for creating a Syndication Service with WCF. In this guide, I will create a WCF Service that returns my blogs posts as RSS 2.0 and ATOM items, that can be consumed with an RSS Reader. Creating the Service Contract 1. Create a new Class Library, and add references to the System.Runtime.Serialization.dll which contains the basic attributes used for serialization, System.ServiceModel.dll which contains the WCF components that shipped with .Net Framework 3.0, and System.ServiceModel.Web.dll which is a .Net Framework 3.5...
no comments

How To: Model Inheritance in Databases

יום ראשון, ספטמבר 30, 2007

How To: Model Inheritance in Databases Playing with some Object Relational Mapping technologies these days such as Linq to SQL and ADO.Net Entity Framework, one of the capabilities that is important to check is which strategies of inheritance modeling is supported by each technology. This post talks about how to model inheritance in the database, regardless the technology that we will use later to talk to the database. Assuming that the business entities look somewhat similar to this:   There are three common strategies of modeling this class hierarchy in the database: Table per Class Hierarchy This strategy means that all the class hierarchy...

How To: Write a Custom Validator for Validation Application Block (VAB) using Application Block Software Factory

יום חמישי, יולי 26, 2007

How To: Write a Custom Validator for Validation Application Block (VAB) using Application Block Software Factory This post is a step by step guide on how to write a custom validator using Application Block Software Factory and integrate it in the configuration editor of Enterprise Library. When you install Enterprise Library 3.1, you not only get library code and documentation, you also get the Application Block Software Factory. This factory allows you to create new application block that can sit above the Enterprise Library code services such as configuration and ObjectBuilder. This Software Factory can also help you to create typed...

How To: Create Virtual Directory for your Service using Script

יום חמישי, אפריל 27, 2006

How To: Create Virtual Directory for your Service using Script When you want to host your WCF Service in IIS, you should follow several steps: 1. Your service should compile to \bin directory instead of \bin\debug2. You must change the name of the configuration file from app.config to web.config3. Create a .svc file in a specific format.and4. Create a virtual directory in IIS that points to the physical location of you service (probably not a subdirectory of wwwroot..) I am using 2 scripts for creating and removing virtual directories for my WCF Services. You can find them...