DCSIMG
October 2008 - Posts - Rotem Bloom's Blog

Rotem Bloom's Blog

Share knowledge on .NET and web development

News

About Me

Glad to help and share knowledge on .NET and also huge fan of Dream Theater.

Contact me via messenger

View Rotem Bloom's profile on LinkedIn

Dream Theater Pics

Blogs I Read

October 2008 - Posts

Microsoft Web Deployment Tool - Beta 1

Hi,

The Microsoft Web Deployment Tool (msdeploy.exe) is a command-line tool that enables you to synchronize or migrate Web sites or Web servers. It can be used with Information Services (IIS) version 6.0 on Microsoft® Windows Server™ 2003 or IIS 7.0 on Microsoft® Windows Server™ 2008. It can be used to accomplish the following tasks: 

1. Migrate your Web server or a single Web site from IIS 6.0 to an IIS 7.0 server.

3. Sync your Web server or a single Web site from IIS 7.0 to another IIS 7.0 server. 

3. Sync your Web server or a single Web site from IIS 6.0 to another IIS 6.0 server.

Download: 

Download the x86 version: http://go.microsoft.com/fwlink/?LinkId=109365

Download the x64 version: http://go.microsoft.com/fwlink/?LinkId=109366

Want to read more: Microsoft Web Deployment Tool

.NET Validation Framework For: WPF, ASP.Net, Windows Forms, ASP.Net MVC and web services

There is a great open source project on codeplex: .NET validation framework.

This project apply reusable and customizable validation rules to properties, methods, and parameters in your business objects. Works with WPF, ASP.Net, Windows Forms, ASP.Net MVC and web services.

(This library is written in C# but can be consumed by any .net assembly)
Requires: .net Runtime 3.0.

I really recommend to use this framework it is very strong and easy to use.

Want to read more? here is the link to codeplex: .NET Validation Framework.

I really wants to see your comments on this project, I use it on my ASP.NET applications.

Did you know .NET DEVPATH environment variable??

Hi All,

Did you ever want that .NET will look your .NET assemblies on path you can control on. well there is a way to do it by using DEVPATH.

Developers might want to make sure that a shared assembly they are building works correctly with multiple applications. Instead of continually putting the assembly in the global assembly cache during the development cycle, the developer can create a DEVPATH environment variable that points to the build output directory for the assembly.

Read more How to: Locate Assemblies by Using DEVPATH.

Compress and Consolidation of JavaScript and CSS files for .NET

Hi,

There is cool open source project in codeplex called: Javascript and CSS Consolidation for ASP.NET that give infrastructure for compress and consolidation JS and CSS files for ASP.NET application.

Project Description

A library for ASP.NET that provides an easy way to consolidate external javascript and css files. The primary goals for this project are:

* Make the development environment mirror production as much as possible (e.g. files should be consolidated in all environments including the local dev box)
* Allow the developer to organize their scripts and styles in as many files as they please without compromising on performance
* Make the process seemless for the developer so that they can edit their files and immediately have them included on the next page request (without the need to build or run an external tool)
* Have it all integrate nicely with ASP.NET and MSBuild

Introducation

As the web progresses and AJAX becomes more and more popular, the amount of javascript in a typical website is growing. As a result, being able to manage your scripts (and css) is becoming critical. From the developer's point of view, you want to be able to organize your code into lots of files and freely include comments in your scripts where necessary. However, as a website grows, having lots of script includes and comments in the scripts has a significant effect on performance for the end user. (more round trips for the browser and larger files to download). What is ideal then, is to be able to break out your scripts into as many files as you want, adding as many comments as you would like, and then put your scripts through a packaging process so that when the website runs, it includes all of your scripts as one or two larger files with all of the comments and insignificant whitespace taken out). Out of the box, ASP.NET does not give you much help in this area, and while there are plenty of libraries out there that can compress and consolidate scripts, automating them and integrating them into your environment is not always easy. This library exists to make that process seem less.

How It Works


This library provides a configuration section where you can create groups in which your .js and .css files will be included on your page. The groups are specified using regular expressions. Here is an example of a config section:

<almWitt.web.resourceManagement consolidate="true">
	<clientScripts compress="true">
		<group consolidatedUrl="~/controls.js">
			<include>
				<add pattern=".ascx.js"/>
				<add pattern=".aspx.js"/>
			</include>
		</group>
		<group consolidatedUrl="~/default.js">
			<!-- no include so everything is included except that which is explicitly excluded -->
			<exclude>
				<add pattern="~/thirdpartyscripts/"/>
				<add pattern="~/scripts/ExcludedScript.js"/>
			</exclude>
		</group>
	</clientScripts>
	<cssFiles>
		<group consolidatedUrl="~/allstyles.css">
			<include>
				<add pattern=".css"/>
			</include>
		</group>
	</cssFiles>
</almWitt.web.resourceManagement>

You can find the project here.

 

 

Restore the Show desktop icon

Hi,

Did you ever lost your "Show Desktop" icon and didnot know how to restore it.

 

Well there is a nice script you can run from: Start --> Run window. Just type

regsvr32 /n /i:U shell32.dll

 

Your Show Desktop icon will return :-).

(If you still don't see the icon, close the "Quick Lunch" toolbar and open it again)

 

Well pretty nice don't you think?

Parsing Google Search QueryString in .NET

Hi,

If you want to view queries in real time as users visit your site (Want to know from which link and keywords users enter to your site), you can. Sam Allen wrote a nice solution for this problem in C#.

take a look on his blog article here.