Jul 19 2007

ASP.NET Development Server

Category:Bil@l @ 06:29

In this post I will show you how to setup the ASP.NET Development Server manually and bind it to a specific Port Number and Website without having to run it by default from the VS 2005 IDE.

Open your CMD window and browse to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

In that path, you will find the WebDev.WebServer.exe which is the ASP.NET Development Server present in Visual Studio 2005.

Now, if you type: WebDev.WebServer.exe /?, you get such a window:

WebDev.WebServer Help

 

So let us configure the WebDev.WebServer.exe to run on a Port number of our choice and attach a sample website to it:

WebDev.WebServer.exe /port:9999 /path:"C:\Inetpub\wwwroot\website1"

That's it! Now you can see on your taskbar a small window icon representing the ASP.NET Development Server saying that it is bound to port - 9999.

Open the browser of your choice, go to : http://localhost:9999/ and here it is, your website is running!

Hope this post is helpful for you!
Regards

Tags:

Jul 17 2007

ASP.NET in ORCAS

Category:Bil@l @ 21:09

I would like to invite you to check the latest article by my MVP colleague Rick Strahel,

ASP.NET Orcas: Quiet Revolution 

Thanks Rick!

Hope you will enjoy it!
Regards

Tags:

Jul 15 2007

Fluent Interface in C#

Category:Bil@l @ 20:21

A nice post I passed through today: Fluent Interface.

It is a very nice programming style of adding "method-action" functionalities on an object. It makes you write less code and clear one! For instance, you can build Query-Like objects in an API using this style of fluent interface. Here is a sample code that shows how a C# object implements the fluent interface by adding "action-methods", where each method does a certain action "setting a value on an internal field" and return an instance of the object itself, here is the code:

public class CustomStringList
{
    List<string> innerList = null;

    public CustomStringList()
 {
        this.innerList = new List<string>();
 }

    public CustomStringList AddValue(string value)
    {
        this.innerList.Add(value);
        return this;
    }

    public CustomStringList RemoveValue(string value)
    {
        this.innerList.Remove(value);
        return this;
    }

    public int Count
    {
        get
        {
            return this.innerList.Count;
        }
    }

Now to use the above object, you can write something as:

        CustomStringList stringList =
            new CustomStringList()
            .AddValue("ASP.NET")
            .AddValue("Bilal")
            .AddValue("Wessam")
            .AddValue("Haissam")
            .AddValue("Sami")
            .AddValue("C#")
            .RemoveValue("Bilal");

        int numberOfElements= stringList.Count;

Hope you liked this post, as I am very impressed by this style and I have in mind so many ideas to build based on this fluent interface concept! You can read more on Fluent Interface here: http://en.wikipedia.org/wiki/Fluent_interface

Regards

Tags:

Jul 15 2007

Read Large XML File into a DataSet

Category:Bil@l @ 13:52

While preparing my lectures for the 2541- Core Data Access I noticed a very nice comments on the MSDN website which talks about loading large XML files into a DataSet.

When you have a large XML file, the recommend way to load it to a DataSet is as follows:

 foreach (DataTable t in ds.Tables)
  t.BeginLoadData();

 ds.ReadXml("file.xml");
 
 foreach (DataTable t in ds.Tables)
  t.EndLoadData();

The BeginLoadData turns off any notifications while loading the data.

Hope this helps you,
Regards

Tags:

Jul 14 2007

Microsoft Health Common User Interface

Category:Bil@l @ 19:06

For those of you who develop applications targeted in the medication field, there is a very important online resource for you which I believe is a must for you to check and use all the controls offered there in your applications.
Here is part of the welcome message on the website:

"
The Microsoft Health Common User Interface (CUI) provides Design Guidance and controls which allow a new generation of safer, more usable and compelling health applications to be quickly and easily created. This site is aimed at user interface designers, application developers and patient safety experts who want to find out more about the benefits of a standardized approach to user interface design.
"

Best Regards,
Bilal
 

 

Tags:

Jul 13 2007

JSON Editor

Category:Bil@l @ 15:10

I was reading on Joe Stagner's blog today and I was amazed by the nice JSON editor he introduced on his blog, check it out here:

http://www.thomasfrank.se/json_editor.html

 

Regards

Tags:

Jul 13 2007

SubSoniProject - Zero DAL Code

Category:Bil@l @ 15:07

Check out the owesome SubsonicProject that helps you build faster yet efficient Data Access Layers for your applications, whether it is Windows App or Web App!

http://www.subsonicproject.com/

 

Regards

Tags:

Jul 12 2007

SingingEels is in town

Category:Bil@l @ 21:42

I would like to invite you to check a new website I found lately: www.singingeels.com. The website contains so many useful and important articles to check!

Enjoy it!
Regards

Tags: