Saturday, April 25, 2009

Creating the first Windows Server 2003 Domain Controller in a domain

Posted on/at 8:50 AM by Admin

Creating the first Windows Server 2003 Domain Controller in a domain

Preface:

One of the greatest features of Windows Server 2003 is its ability to be a Domain Controller (DC).  The features of a domain extend further than this tutorial ever could, but some of its most well known features are its ability to store user names and passwords on a central computer (the Domain Controller) or computers (several Domain Controllers).  In this tutorial we will cover the "promoting" (or creating) of the first DC in a domain.  This will include DNS installation, because without DNS the client computers wouldn't know who the DC is.  You can host DNS on a different server, but we'll only deal with the basics.

Method:

Click Start -> Run...

clip_image001

Type "dcpromo" and click "OK"

clip_image002

You will see the first window of the wizard.  As it suggests, I suggest reading the help associated with Active Directory.  After this, click "Next"

clip_image003

Click "Next" on the compatibility window, and in the next window keep the default option of "Domain Controller for a new domain" selected, and click "Next"

clip_image004

In this tutorial we will create a domain in a new forest, because it is the first DC, so keep that option selected

clip_image005

Now we have to think of a name for our domain.  If you own a web domain like "visualwin.com", you can use it, but it isn't suggested because computers inside of your domain may not be able to reach the company website.  Active Directory domains don't need to be "real" domains like the one above - they can be anything you wish.  So here I will create "visualwin.testdomain"

clip_image006

Now in order to keep things simple, we will use the first part of our domain ("visualwin"), which is the default selection, as the NetBIOS name of the domain

clip_image007

The next dialog suggests storing the AD database and log on separate hard disks, and so do I, but for this tutorial I'll just keep the defaults

clip_image008

The SYSVOL folder is a public share, where things like .MSI software packages can be kept when you will distribute packages (as I said, AD has a lot of different features).  Once again, I will keep the default selection but it can be changed if you wish to use the space of another drive

clip_image009

Now we will get a message that basically says that you will need a DNS server in order for everything to work the way we want it (i.e., our "visualwin.testdomain" to be reachable).  As I mentioned earlier, we will install the DNS server on this machine as well, but it can be installed elsewhere.  So keep the default selection of "Install and configure", and click "Next"

clip_image010

Because, after all, this is a Windows Server 2003 tutorial website, we'll assume there are no pre-Windows 2000 servers that will be accessing this domain, so keep the default of "Permissions compatible only with Windows 2000 or Windows Server 2003 operating systems" and click "Next"

clip_image011

The restore mode password is the single password that all administrators hope to never use, however they should also never forget it because this is the single password that might save a failed server.  Make sure it's easy to remember but difficult to guess

clip_image012

Now we will see a summary of what will happen.  Make sure it's all correct because changing it afterwards can prove to be difficult

clip_image013

After the previous next was clicked, the actual process occurs.  This can take several minutes.  It's likely that you will be prompted for your Windows Server 2003 CD (for DNS) so have it handy

clip_image014

If your computer has a dynamically assigned address (from DHCP) you will be prompted to give it a static IP address.  Click ok, and then in the Local Area Connection properties, click "Internet Protocol (TCP/IP)" and then "Properties"

clip_image015

In the next window select "Use the following IP address" and select the information that you will use for your domain (and 127.0.0.1 for the primary DNS, because your computer will host DNS.  I still suggest setting up an alternate as well.)  Click "OK" and then "Close" on the next window

clip_image016

And after a while you will see

clip_image017

And we're finished.  You may also want to see the other Active Directory tutorials on the main page.

Copyright ©2002-2008 Jonathan Maltz.  For trademark/copyright information, click hereAbout meMain pageContact me.

Thursday, April 2, 2009

Windows Vista with multi language Interface (Arabic - English - French ....)

Posted on/at 5:29 AM by Admin


Windows Vista with Arabic Interface


We can change Vista interface from English to Arabic Interface by the use of Vistalizator Tool.
This tool is so easy in use and language installation.

The applicable Vista editions for the above tool are:

- Basic
- Home
- Home Premium
- Business Starter

How can we do the language installation? (Vista Bit 32)
1- Install one of the above Vista Version
2- Download the Vistalizator Tool download
3- Download the target language

a. Arabic
b. English
c. Spanish
d. Germany
e. French
f. Others

4- Follow up the following steps:
a- Open the Vistalizator Tool



b- Add Language




c- Choose the downloaded language




d- After open, click OK








e- Finally, Restart and enjoy the Arabic Interface




Note: The Visat Arabic Interface is about 70-80% correct.

You can restore the English language by the use of the tool:





Changing Vista English Ultimate to Arabic Interface:

1- Open Control Panel
2- Open Clock, Language, and Region Then Select Change Keyboards
3- Click Install/uninstall languages
4- Browse for the language file with the extension of .cab then click OK
5- Choose the target language
6- Read the conditions and click Next
7- Finally, Click Install

Also, you can do the same function with the use of Windows Update.





Wednesday, April 1, 2009

Asp.Net 2.0 Membership I : LoginStatus LoginName - Shalvin

Posted on/at 3:29 PM by Admin

ASP.NET Chat - AJAX Chat Control (JaxterChat)

Posted on/at 3:22 PM by Admin

Singleton Pattern

Posted on/at 8:17 AM by Admin

Intent
  • Ensure a class has only one instance, and provide a global point of access to it.
  • Encapsulated "just-in-time initialization" or "initialization on first use".
Problem

Application needs one, and only one, instance of an object. Additionally, lazy initialization and global access are necessary.

Discussion

Make the class of the single instance object responsible for creation, initialization, access, and enforcement. Declare the instance as a private static data member. Provide a public static member function that encapsulates all initialization code, and provides access to the instance.

The client calls the accessor function (using the class name and scope resolution operator) whenever a reference to the single instance is required.

Singleton should be considered only if all three of the following criteria are satisfied:

  • Ownership of the single instance cannot be reasonably assigned
  • Lazy initialization is desirable
  • Global access is not otherwise provided for

If ownership of the single instance, when and how initialization occurs, and global access are not issues, Singleton is not sufficiently interesting.

The Singleton pattern can be extended to support access to an application-specific number of instances.

The "static member function accessor" approach will not support subclassing of the Singleton class. If subclassing is desired, refer to the discussion in the book.

Deleting a Singleton class/instance is a non-trivial design problem. See "To Kill A Singleton" by John Vlissides for a discussion.

Structure

Scheme of Singleton

Make the class of the single instance responsible for access and "initialization on first use". The single instance is a private static attribute. The accessor function is a public static method.

Scheme of Singleton.

Example

The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance. It is named after the singleton set, which is defined to be a set containing one element. The office of the President of the United States is a Singleton. The United States Constitution specifies the means by which a president is elected, limits the term of office, and defines the order of succession. As a result, there can be at most one active president at any given time. Regardless of the personal identity of the active president, the title, "The President of the United States" is a global point of access that identifies the person in the office.

Example of Singleton.

Check list
  1. Define a private static attribute in the "single instance" class.
  2. Define a public static accessor function in the class.
  3. Do "lazy initialization" (creation on first use) in the accessor function.
  4. Define all constructors to be protected or private.
  5. Clients may only use the accessor function to manipulate the Singleton.
Rules of thumb
  • Abstract Factory, Builder, and Prototype can use Singleton in their implementation.
  • Facade objects are often Singletons because only one Facade object is required.
  • State objects are often Singletons.
  • The advantage of Singleton over global variables is that you are absolutely sure of the number of instances when you use Singleton, and, you can change your mind and manage any number of instances.
  • The Singleton design pattern is one of the most inappropriately used patterns. Singletons are intended to be used when a class must have exactly one instance, no more, no less. Designers frequently use Singletons in a misguided attempt to replace global variables. A Singleton is, for intents and purposes, a global variable. The Singleton does not do away with the global; it merely renames it.
  • When is Singleton unnecessary? Short answer: most of the time. Long answer: when it's simpler to pass an object resource as a reference to the objects that need it, rather than letting objects access the resource globally. The real problem with Singletons is that they give you such a good excuse not to think carefully about the appropriate visibility of an object. Finding the right balance of exposure and protection for an object is critical for maintaining flexibility.
  • Our group had a bad habit of using global data, so I did a study group on Singleton. The next thing I know Singletons appeared everywhere and none of the problems related to global data went away. The answer to the global data question is not, "Make it a Singleton." The answer is, "Why in the hell are you using global data?" Changing the name doesn't change the problem. In fact, it may make it worse because it gives you the opportunity to say, "Well I'm not doing that, I'm doing this" – even though this and that are the same thing.

Prototype Pattern

Posted on/at 8:17 AM by Admin

 

Intent
  • Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
  • Co-opt one instance of a class for use as a breeder of all future instances.
  • The new operator considered harmful.
Problem

Application "hard wires" the class of object to create in each "new" expression.

Discussion

Declare an abstract base class that specifies a pure virtual "clone" method, and, maintains a dictionary of all "cloneable" concrete derived classes. Any class that needs a "polymorphic constructor" capability: derives itself from the abstract base class, registers its prototypical instance, and implements the clone() operation.

The client then, instead of writing code that invokes the "new" operator on a hard-wired class name, calls a "clone" operation on the abstract base class, supplying a string or enumerated data type that designates the particular concrete derived class desired.

Structure

The Factory knows how to find the correct Prototype, and each Product knows how to spawn new instances of itself.

Scheme of Prototype

Example

The Prototype pattern specifies the kind of objects to create using a prototypical instance. Prototypes of new products are often built prior to full production, but in this example, the prototype is passive and does not participate in copying itself. The mitotic division of a cell - resulting in two identical cells - is an example of a prototype that plays an active role in copying itself and thus, demonstrates the Prototype pattern. When a cell splits, two cells of identical genotvpe result. In other words, the cell clones itself.

Example of Prototype

Check list
  1. Add a clone() method to the existing "product" hierarchy.
  2. Design a "registry" that maintains a cache of prototypical objects. The registry could be encapsulated in a new Factory class, or in the base class of the "product" hierarchy.
  3. Design a factory method that: may (or may not) accept arguments, finds the correct prototype object, calls clone() on that object, and returns the result.
  4. The client replaces all references to the new operator with calls to the factory method.
Rules of thumb
  • Sometimes creational patterns are competitors: there are cases when either Prototype or Abstract Factory could be used properly. At other times they are complementory: Abstract Factory might store a set of Prototypes from which to clone and return product objects. Abstract Factory, Builder, and Prototype can use Singleton in their implementations.
  • Abstract Factory classes are often implemented with Factory Methods, but they can be implemented using Prototype.
  • Factory Method: creation through inheritance. Protoype: creation through delegation.
  • Often, designs start out using Factory Method (less complicated, more customizable, subclasses proliferate) and evolve toward Abstract Factory, Protoype, or Builder (more flexible, more complex) as the designer discovers where more flexibility is needed.
  • Prototype doesn't require subclassing, but it does require an "initialize" operation. Factory Method requires subclassing, but doesn't require Initialize.
  • Designs that make heavy use of the Composite and Decorator patterns often can benefit from Prototype as well.
  • Prototype co-opts one instance of a class for use as a breeder of all future instances.
  • Prototypes are useful when object initialization is expensive, and you anticipate few variations on the initialization parameters. In this context, Prototype can avoid expensive "creation from scratch", and support cheap cloning of a pre-initialized prototype.
  • Prototype is unique among the other creational patterns in that it doesn't require a class – only an object. Object-oriented languages like Self and Omega that do away with classes completely rely on prototypes for creating new objects

Source:

 

http://sourcemaking.com/design_patterns/prototype

About Me

Developers house is a blog for posting technical articles in different technology like Microsft, Java, Oracle ..etc Microsoft technology includes c#,VB.net,ASP.net,Ajax,SilverLight,TFS,VS.NET 2003,2005,2008,2010 , SQL Server 2000, 2005 , Expression Blend , ...etc I hope it is helpful for all of you and if you are interested to post articles on it, only send me at ahmad.eed@gmail.com