Manish 的个人资料Manish Agrawal照片日志列表 工具 帮助

日志


11月19日

Build important management and leadership abilities...

MSDN® Success Builder, a unique and free resource to help software professionals build important management and leadership abilities.
 
You can find some incredibly valuable courseware (on this page) derived from common practices at Microsoft. So go on and take your pick from easy-to-absorb tip sheets to in-depth material on a topic of your interest.
 
MSDNSuccessBuilder
11月8日

Management and Delegation of ASP.NET.. nice article by Jeff Toews

Jeff Toews has written an excellent article on Management and Delegation of ASP.NET. To view the article Click here.

In this article he has presented some configuration tips on proper Configuration of ASP.NET.

9月12日

Steps of Installing MOSS 2007

>

 

MOSS 2007 can be installed as a Stand-alone Server application or as a Server farm or as a Web Front End. MOSS 2007 installs WSS v3.0 automatically.

If you have only one server, you have no option but to install Stand-alone Type, this will install desktop database engine (SQL Server 2005 Express Edition) along. It will be an independent instance of SQL Server just for the SharePoint application. But this will result in very poor performance. And can only be used by a very small user group or just for learning purpose.

If you have to use it in a relatively larger setup you must install SharePoint farm (atleast one Complete - Install all components Server Type) with database on a different dedicated database server.

In this post I will show the steps for installing MOSS 2007 SharePoint farm:

Prerequisites: Please read this before installing Beta 2

 

Step 1: Start the installation by clicking the Setup.exe in the x86/x64(for 64 bit machine), and the installation starts with the following screen. Select the Complete Server Type option and click the Install Now button. This is will take few minutes and will install the basic components.

 

Step 2: After the installation of basic components, it will automatically start the SharePoint Products and Technologies Wizard. This Wizard can even be started from the Start-->All Programs-->Microsoft Office Server-->SharePoint Products and Technologies Wizard link also. This is will present a Welcome screen, Click the Next > button

 

Step 3: Next screen will be of Connect to a server farm, if it is the first server in the farm select the option "No, I want to create a new server farm" and if there are already one or more existing server, you can select either of the option "Yes, I want to connect to an existing server farm" or "No, I want to create a new server farm", Click the Next > button

 

Step 4: In this step specify the Configuration Database Settings. Do remember if your configuration database is hosted on another server, you must specify a domain account (Global Domain Account), Click the Next > button

 

Step 5: Next step is to Specify the port number for the SharePoint Central Administration Web Application. details of Web Application and the port number can be read from the following screen shot, Click the Next > button

 

Step 6: Finally it will show the Configuration Successful screen, Click the Finish button

Step 7:  This will open up the Central Administration homepage in the browser.

Step 8: In the Administrative Tasks as shown in the above screen-shot, Click on the "Initial Deployment: Assign Services to Servers" link, this will open-up the following page, Click the Action Link "Initial Deployment: Assign Services to Servers"

 

Step 9: It will open-up the following screen, just make sure you start all highlighted services in the list(or atleast the one shown as Started here) :

 

Step 10: Now go back to the Home-page as shown in Step 7 and click the "Application Management" tab, this will open-up the following screen, Now since Services on Server are started, "Create or extend Web application" will be displayed. Click the link.:

It will further show the following page, continue with the "Create a new Web Application" link:

 

Step 11: Now the Create New Web Application Screen will open. Fill the appropriate values. By default it will show some Port number but since I wanted to host the application on 80 port I changed it to 80. Also there please remember the following 

Notes:

  1. In the Load Balanced URL section change the name of the server to the IP of the server in the URL, by doing this you will not require do DNS settings, if otherwise you can continue with the server name also,
  2. In the Application Pool section select a configurable security account. I have given my security account  ID. In my case both Predefined options(Network Service/Local Service) didn't worked and gave error.

  

 

 

Step 12:  You will get the following screen on completion of Step 11. Now Click the "Create a new Windows SharePoint Services site collection." link

 

Create the site collection and that's it.

You can create multiple Web-Applications(at different Port) and multiple Site-Collections in every Web-Application.

 

For your reference, there are few good documentation available:

8月16日

Microsoft Releases Windows Live Writer..

Windows Live Writer was released last Friday. I am writting this post using the tool.

It is a desktop application that provides a really nice editing environment for writing blog posts (spell checker, layout manager, offline editing support, etc). It can be used not only with Live Spaces but also with many other server blogs.

Eric Cherng has put together a really nice Windows Live Writer walkthrough that shows off how to install and use it to write your first blog post.  You can checkout his post on how to-do this here.

Cool tools.. Great Stuff..

Microsoft is really becoming Lively..

8月13日

ASP.NET 2.0 page life cycle

2 years back I came across a very good diagram of ASP.Net Page LifeCycle, which I lost. I tried to find it again many times but couldn't find. Luckily today, I found the updated version of the Diagram (i.e. for ASP.Net 2.0), thanks to Kris van der Mast who posted it on his blog. He has given All credits to the original designer of the diagram: Léon Andrianarivony, but equal amount of credit goes to him as well.
6月14日

How To: Install the Subversion HTTP Module/Server/Client on Windows

  1. Download the binaries

For Server machine:

Go to the Apache download page and download the version (apache_2.0.54-win32-x86-no_ssl.msi) of Apache web server. I tried downloading some latest versions also but faced few issues in installation, so I continued with version 2.0.54.

Go to the Svn1ClickSetup download page and download the latest version. As of the writing of this article it is 1.3.2.

 

For Client machine/s:

It will be sufficient to just install Tortoise SVN Client, it can be downloaded from TortoiseSVN Page. As of the writing of this article latest version was 1.3.4

  1. Set up Subversion on Server

Run the Svn1ClickSetup executable (Svn1ClickSetup-1.3.2.exe) downloaded in the previous step. All the installation locations mentioned in this article are assumed to be default locations.

 

Note: Svn1ClickSetup installs a Subversion service, if you don’t want to be running this service, open a command prompt, and run the following command:

 

svnservice -remove
  1. Set up TortoiseSVN on Client

Run the TortoiseSVN Setup executable (TortoiseSVN-1.3.4.6692-svn-1.3.2.msi) downloaded in the previous step.

Note: If you are working on VS.Net with Web Projects, it is recommended to select ASP.Net Hack on the Custom Setup step of the installation wizard. Although I have not explored consequences of not selecting it but it is hardly of any harm, as it not even takes 1 kb of your hard disk space.

  1. Install Apache

Run the Apache installer (apache_2.0.54-win32-x86-no_ssl.msi) that you downloaded. It is pretty simple to install.

Once the installation finishes, launch a web browser, and browse to http://localhost. If you see a test page from Apache, the server is installed correctly.

Note: If port 80 is already occupied, you will have to stop the Webserver on which it is running or you will have to stop that WebSite. As Apache installation wizard gives not enough options of setting port while installation.

Later you can change the default port (which I recommend) in the httpd.conf file located in C:\Program Files\Apache Group\Apache2\conf  folder.

You will have to make changes at two places, firstly search for word Listen and replace 80 with your desired port number for example 8181

 

Listen 8181

 

Secondly search for ServerName and replace :80 with your desired port number.

 

ServerName yourdomain.com:8181

You will have to restart Apache and now you can launch a web browser, and browse to http://localhost:8181/

 

Note: Now don’t forget to restart the Webserver or WebSite, which you mayhave stopped.

  1. Set Up HTTP Access

The first thing we need to do is make sure that Apache loads the WebDav modules. The Apache config file (httpd.conf) is located in the C:\Program Files\Apache Group\Apache2\ conf directory. Launch a text editor, and open the Apache config file. You will want to keep this file open for the rest of the installation.

 

Copy the Subversion HTTP modules:

Program Files\Subversion\bin\mod_dav_svn.so

Program Files\Subversion\bin\mod_authz_svn.so

into the Apache modules directory (Program Files\Apache Group\Apache2\Modules).

 

In the config file, look for a section of lines that all start with LoadModule. At the end of that section, add the following lines:

LoadModule dav_module modules/mod_dav.so

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

 

At this point, restart the Apache2 service (Control Panel > Administrative Tools > Services). You will probably want to keep the Services window open (we will be restarting Apache several more times). If it restarts with no errors, Apache is now loading the SVN module.

 

Back in the Apache config file, add the following to the end of the file:

<Location /repos>
  DAV svn
  SVNPath "C:\svnrepos"
</Location>

Restart Apache2 again. You can now access your repository via HTTP.

  1. Configuring Authentication

Νote: There are several different ways to configure authorization for Subversion, but in this article only basic authorization is mentioned. Basic authorization sends the passwords in near plain-text, so if you are concerned with password snooping, you will have to use a different authorization scheme.

 

Now, we can browse our repository via HTTP. Not only that, but we can also check-out, modify, and commit changes. However, none of these operations require any type of authorization. Not exactly what we want, especially if we are going to have multiple users.

 

To enable authorization, we need to tell Apache who the authorized users are. To do this, we give Apache a file with a list of the authorized users and their passwords. Apache makes this job easy by providing a utility to mange the user file, htpasswd.

 

Let’s go ahead and create our user file with the users Tom and Jerry. We are going to put our file in the Apache conf directory, so open a command prompt to that directory (C:\Program Files\Apache Group\Apache2\conf). Type the following command, and then enter a password for Tom.  

C:\Program Files\Apache Group\Apache2\bin\htpasswd -cm svn-auth-file Tom

Now type the following command to add Jerry to the file.  

C:\Program Files\Apache Group\Apache2\bin\htpasswd -m svn-auth-file Jerry

Note: There is difference between these two commands. The first command passes in the -c command, which tells htpasswd to create the file. The second time, the file already exists, so just   -m command is enough. The second command can be used to add additional users to the file. In the svn-auth-file entries for both Tom and Jerry can be seen.

 

Now that authorization file is created, some Apache configuration is also required. Go back to the Location tag that we added to the Apache config file. And add some more lines to it so that it looks like this

 

<Location /repos>
  DAV svn
  SVNPath "C:\svnrepos"
  AuthType Basic
  AuthName "Subversion repository"
  AuthUserFile "C:\Program Files\Apache Group\Apache2\conf\svn-auth-file"
  Require valid-user
</Location>
 

After restarting Apache2 once again, browse to your repository again. This time, you will be prompted for a user name and password. Cool, we have authorization working. However, if you don’t want to be prompted for a user name unless modifying the repository, you are not quite finished yet.

 

Thankfully, only requiring authorization for modifications is really easy. All you have to do is add a couple more lines to the location tag so that it looks like this

 

<Location /repos>
  DAV svn
  SVNPath "C:\svnrepos"
  AuthType Basic
  AuthName "Subversion repository"
  AuthUserFile "C:\Program Files\Apache Group\Apache2\conf\svn-auth-file"
  <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
  </LimitExcept>
</Location> 

One last restart of Apache2 and you now have the Subversion HTTP module installed, configured, and ready to control our revisions.

 

 

 

Reference: http://blog.briankohrs.com/2005/09/20/guide-to-installing-the-subverison-http-module-on-windows/#comments

I have modified Brian Kohr’s article as I felt it was missing few things. I hope it will be of help and will be taken in the right spirit.

5月17日

Remove Previous Versions Property of MSI Setup in .Net

MSI Setup provides lots of custom actions and options to make Installation Setup/Package extremely customizable and easy to create.
 
Today I came across a requirement in my project, that the MSI setup should prompt to remove previous installed version of the application before new installation.
But after looking around for some properties and options of the Setup project, to my surprise there was no direct property available in the property pages of the MSI project. 
It seems Visual Studio team missed to add the property to the Property Pages where as it is available if you select the project by clicking it in the Solution Explorer and then view it's properties by pressing F4 function key. Here you can see the RemovePreviousVersions property. Set it to true thats it.
 
Now the new MSI, which will get created will not install the application, if there is any previous Version of the application is installed on the machine.
 
Note: You will have to change the Version No. (Major, Minor, Build or Revision) to make it work.
10月8日

Smart Tools for .Net

Code Generation with Codesmith

Brian Boyce

Ever find yourself writing the same type of code over and over again? While code generation isn't a panacea, it can certainly help speed up the development process and improve the reliability and maintenance of your code. In this article, Brian Boyce shows how a freeware product called Codesmith can be used to kick-start your projects by demonstrating the development of a set of templates to generate Select, Insert, Update, and Delete stored procedure code together with a corresponding C# data access layer to call the stored procedures.

 

More details can be found at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvs04/html/vs04e5.asp

 

 

Customizing MSI Installation
Deploying .NET applications is very easy compared to the old days. Now xcopy deployment is possible. However, a simple xcopy deployment is limited. It doesn't account for layered application deployment, configuration settings, fine-tuning, and so on. Integrating application layers in a distributed framework with a custom configuration requires a professional, customizable deployment tool. Microsoft Windows Installer (MSI) based deployment does all this and more. However, making it work requires some effort. Fortunately, Visual Studio .NET's Setup and Deployment Projects make it pretty straightforward.
 
Complete article with example is available at:

NLog: .NET Logging Tool

NLog is a .NET Logging Tool designed with simplicity and flexibility in mind. In many concepts it is similar to log4net (http://logging.apache.org/log4net).
log4net too difficult to configure and maintain and too Java-ish to use. NLog is more .NET friendly as far as usage and extensibility are concerned. http://nlog.sourceforge.net/config.html#file
 
Nant .Net Build Tool
NANT is a .Net build tool for Release process alongwith Cruisecontrol.net.
Get the Latest updates, Nightly Builds on Nant over this link.
 
 
Aspnet_compiler.exe Compler in 2.0
ASP.NET Compilation Tool in Framwork 2.0, it comprises a lot of Build options ed. precompiled web etc.
MSBuild, the build tool used this for comiling .Net Projects. MSBuild.exe calls Aspnet_compiler.exe inturn to compile the project/s.
 
 
 
In future posts, I will cover more on NDoc, NCover, NUnit, PSI, unleashit, iisadmin, ANTS, FxCop, LogParser etc.
 
9月23日

Mobile Applications

Since I have been involved in innovation of many applications in the Mobile SMS arena. It became my hobby..
 
In my spare time, I started working on a mobile application concept (can't mention till it gets launched, maybe sometime in 2006), gradually it has started taking shape in design charts.
 
So I thought of mentioning of my (as of now)spare time passion...
 
Some of the industry wide recognized Mobile SMS applications in which I was involved are:
Indiatimes 8888 SMS application (Which handles 2 to 3 million SMSs per day)
TAIB Bank Brunei SMS application (Serves both in English and Malay)
Uthingo's South Africa National Lottery 32123 SMS application (A South Africa Govt. undertaking)
NDTV's 6388 SMS application
SIFY's 4545 SMS application
AirSahara's SMS Application for Mobile CheckIN, Airfares etc. (Gnokii implementation)
Bank of Punjab's SMS Application (Gnokii implementation)
 
 
 
For those who are reading this weblog can mention thier ideas or concepts related to mobile applications as comments, it can be anything Applications, Utilities, Games, Surveys, Services, Stats etc.
 
That will make this weblog really great..
9月1日

Really Good Technology Articles

 Few really really good articles..  which must be read again and again:
 
Discover the Design Patterns You're Already Using in the .NET Framework
 
 
Give Your Everyday Custom Collections a Design-Time Makeover
 
Dodge Common Performance Pitfalls to Craft Speedy Applications
 
Unhandled Exceptions and Tracing in the .NET Framework 2.0

 

Test Harness Design Patterns
 

Fast, Scalable, and Secure Session State Management for Your Web Applications

http://msdn.microsoft.com/msdnmag/issues/05/09/SessionState/default.aspx

 

URL Rewriting in ASP.NET (Scott Mitchell - 4GuysFromRolla.com)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp

 

ASP.Net 2.0

Internals

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/Internals.asp 

Localization Features: A Fresh Approach to Localizing Web Applications

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/ASP2local.asp

GridView Examples

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx.asp

Power Programming Tips

http://msdn.microsoft.com/library/default.asp?url=/msdnmag/issues/05/06/WickedCode/toc.asp