Skip to main content

Posts

Showing posts from 2011

Create Visual Studio 2010 SQL Server 2008 Database Project

To create the Visual Studio 2010 SQL Database Project, open the Visual Studio (VS) 2010 as a administrator.  Click on File -> New -> Project : In the opened “New Project” window, under installed templates click on Database -> SQL Server and select “SQL Server 2008 Database Project”, select the location and click “OK” button. Open the solution explorer, you will find the database project has been created with the default folders. Expand Schema Objects folder, expand Schemas folder, expand dbo folder and expand Tables folder. Right click on Tables, select Add -> New Item. In the opened New Item window, select Table and enter the name Books, click Add. Double click on added Books.Table.sql script file and include create table script. Right click on Tables, select Add -> New Item. In the opened New Item window, select Primary Key, enter name and click Add. Open the script file and add script to add primary key for the Books table. You can add other scripts und...

Uninstall ADFS 2.0

To uninstall ADFS 2.0, Go to Control Panel -> Programs -> View Installed Updates.  In the installed updates; look for Active Directory Federation Services under Microsodt Windows updates section. Select ADFS 2.0 and click Uninstall.

C# 5.0: Asynchronous Operations

  Asynchronous functions: is a new feature in C# which provides an easy means for expressing asynchronous operations. Inside asynchronous functions await expressions can await ongoing tasks, which causes the rest of the execution of the asynchronous function to be transparently signed up as a continuation of the awaited task. In other words, it becomes the job of the programming language, not the programmer, to express and sign up continuations. As a result, asynchronous code can retain its logical structure. An asynchronous function is a method or anonymous function which is marked with the async modifier. A function without the async modifier is called synchronous. An asynchronous function in C# must either return void or one of the types Task or Task . Await expressions: Await expressions are used to suspend the execution of an asynchronous function until the awaited task completes. An await expression is only allowed when occurring in the body of an asynchronous function. I...

Microsoft Unity 2.0

Unity is a lightweight, extensible dependency injection container with support for instance and type interception. Microsoft Unity 2.0 Download

Windows Azure AppFabric

Windows Azure AppFabric provides a comprehensive cloud middleware platform for developing, deploying and managing applications on the Windows Azure Platform. It delivers additional developer productivity adding in higher-level Platform-as-a-Service (PaaS) capabilities on top of the familiar Windows Azure application model. Windows Azure is the underlying operating system for running your cloud services on the Windows Azure AppFabric Platform. The three core services of Windows Azure in brief are as follows:  Compute: The compute or hosting service offers scalable hosting of services on 64-bit Windows Server platform with Hyper-V support. Storage: There are three types of storage supported in Windows Azure: Table Services, Blob Services, and Queue Services. Management : The management service supports automated infrastructure and service management capabilities to Windows Azure cloud services.

Windows Server AppFabric

Windows Server AppFabric is a set of integrated technologies that make it easier to build, scale and manage Web and composite applications that run on IIS. Windows Server AppFabric targets applications built using ASP.NET, Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF). Out-of-the-box capabilities to easily build and manage composite applications, including: Enhanced design and development tools in Visual Studio to build rich composite applications Management and monitoring of services and workflows via integration with IIS Manager and Windows PowerShell Distributed in-memory application cache to improve application performance Windows Server AppFabric allows developers to build their next-generation composite applications, and for administrators to host and manage them. It integrates technologies previewed as code name "Dublin" and code name "Velocity". AppFabric components: Runtime Features: Hosting Services : AppFabric ...

Refactoring with Roslyn Circus Comes to Town

The Microsoft .NET compilers are going to give access to the internals of the compilation pipeline, with handy IDE integration too! Language research on .NET will become easier than ever, permitting new kinds of refactoring and compiler/runtime research. Read more....

Error 3154: The backup set holds a backup of a database other than the existing database.

I was trying to restore a database from the windows server 2008 database backup in my local. I was doing through object explorer and was getting "Error 3154: The backup set holds a backup of a database other than the existing database." To fix the issue I tried it with below SQL statements from Query Analyzer. After executing the below commands I was able to restore successfully. RESTORE DATABASE DataBaseName FROM DISK = 'C:\DataBaseName.bak' WITH REPLACE 

FubuMVC

FubuMVC is a .NET open-source front-controller MVC web framework. Fubu (which stands for "for us, by us") focuses on rapid development, pluggability, and convention-based configuration. It tries to focus on SOLID principles, composability, separation of concerns, DRY, and other critical concepts of rapid, frictionless and pain-free web development. There are several differentiating features from ASP.NET MVC, such as behavior chains, packaging, routing conventions, HTML conventions, and much more.

The symptoms of poor software design

The symptoms of poor software design: Rigidity - The design is difficult to change Fragility - The design is easy to break Immobility - The design is difficult to reuse Viscosity - It is difficult to do the right thinng Needless Complexity - Overdesign Needless Repetition - Mouse absue(Cut and Paste) Opacity - Disorganized expression(Code to be difficult to understand)

ISAPI & CGI Restriction configuration missing in IIS

In windows 7 by default ISAPI & CGI Restrictions are not configured. To enable ISAPI & CGI restrictions, GoTo -> Control Panel -> Programs -> Click on "Windows features on or off -> Expand Internet Information Services - >Expand World Wide Web Services ->Select CGI and ISAPI extensions and Click OK. After enabling, Check in IIS, Open your IIS and the feature will be available. What is ISAPI and CGI restrictions : ISAPI and CGI restrictions are request handlers that allow dynamic content to execute on a server. These restrictions are either CGI files (.exe) or ISAPI extensions (.dll). You can add custom ISAPI or CGI restrictions if the IIS configuration system allows this.

HTTP could not register URL

I was recently debugging a WCF self host service in Windows 7 and I got the below exception. "HTTP could not register URL http://+8732/service. Your process does not have access rights to this namespace." After seeing this exception I found that I need to configure namespace reservations. I opened the VS 2010 command prompt in Administration mode and I ran the below command. Netsh http add urlacl=http://+:8732/service user=\Everyone This command adds an URL reservation for the specified URL namespace for the users. After configuring namespace reservation, my self host WCF service got worked. The other alternative to use Netsh http command is to run the VS 2010 in administrative mode. What is Namespace Reservations? Namespace reservation assigns the rights for a portion of the HTTP URL namespace to a particular group of users. A reservation gives those users the right to create services that listen on that portion of the namespace. Reservations are URL prefixes.

Introduction to Visual Studio LightSwitch

Microsoft Visual Studio LightSwitch helps you solve specific business needs by enabling you to quickly create professional-quality business applications, regardless of your development skills. LightSwitch is a new addition to the Visual Studio family. Visual Studio LightSwitch is designed to simplify and shorten the development of typical forms-over-data business applications. Most business applications have a large code base dedicated to addressing operations that create, read, update and delete elements (CRUD). Typically, in this kind of application, a large amount of time is spent on the following development tasks: Writing code to interact with a data source. Creating a User Interface. Writing code to specify the business logic.  more......

Windows Azure Code Quick Start : Prerequisites

Ensure you meet the following prerequisites prior to proceeding Windows Azure Code: You have installed the necessary Windows Azure tools as described at Windows Azure Downloads . You have signed up for Windows Azure subscription. If you do not have a subscription, you can sign up at the Windows Azure Offers site. Windows Azure Code Quick Start

Tool to kill the ASP.NET Development Server instances by port number

 The "Kill Process" tool helps to kill the ASP.NET Development Server instances by port number. The below are the features of this tool. 1. On load the tool displays the running ASP.NET web server instance name and port number 2. Select the port number to kill and click on “Kill Me” button. Kills the selected process. 3. Click on column All it selects all and we can kill all running processes at a time. 4. On form minimize, the notification icon will be displayed in the sys tray. Below is the code. Program.cs: using  System; using  System.Collections.Generic; using  System.Linq; using  System.Windows.Forms; namespace  KillWebServerProcess {      static   class   Program     {          ///            ///  The main entry point for the application.      ...