Tuesday, October 13, 2009

How to create Project Charter in 7 Easy Steps

 

The Project charter is the document that officially starts the project. The charter is one of the most important documents on a project. It is essential for creating the project. The project can’t be official without Project Charter. Absence of Project Charter may create huge difficulties to Project Manager (My personal experience).

Below are seven easy steps to create project charter document.

  • To create a Project Charter, you must be quite clear about the project and its objectives. Begin the document by explaining the project objectives and effect of that project on organization. The charter basically reflect the usefulness of the project for company and its customers. And the main thing, you must to be convinced by it’s statement of purpose.
  • Make list of all the stakeholders and all the persons going to involve in the project. Define their roles and responsibilities. Organization chart can work pretty good here.
  • Developing Project Charter is a group activity. A single person cannot create project charter by alone. Before work on the project can commence, the project charter must be supported by the person in charge or a sponsor. The supervising person signs the project charter document to indicate approval.
  • Define the context and scope of the project, specifying who or what the project will affect. Include the expectations and limitations to the project and people affected by it.
  • Measurement is very important in any project. Project Charter document must have the measurable goals documented.
  • Risk analysis and plan are also quite important in project execution and planning. The Project Charter document should include contingency plans for possible risks. 
  • Resource plan also need to be included in Project Charter document. Include a list of financial, material and staffing resources in project charter.

Tuesday, July 28, 2009

Image Rotation with JQuery

 

I was finding some JQuery plug-ins for image rotation. And I found few excellent stuff. Check below links…

http://designm.ag/tutorials/image-rotator-css-jquery/

http://www.chazzuka.com/blog/?p=101

JQuery simply rocks… It’s my latest love…

Friday, July 10, 2009

Project Server 2007 Implementation

 

Finally, I got success in implementing Microsoft Project Server 2007 in my organization. And at first impression, it seems really cool tool for project management. And I hope this first impression stay last long. The deployment of the Project Server was little bit hectic. That might be due to not having enough experience implementing and installing that. Below are the features, which I really like into Project Server 2007.

  • Excellent Project Web Application.
  • Sync. with Microsoft Project Planner. (It’s really cool)
  • Sync. of tasks and time sheet with Microsoft Outlook. (It’s really helpful, tried in pilot run. Quite impressed).
  • Share Point - document management. And documents’ sync. with Microsoft Outlook.
  • Resource Center.
  • Sync. with Active Directory.

Isn’t it seems cool?? Find below articles for Project Server 2007 implementation guides.

“Deployment for Office Project Server 2007”— http://technet2.microsoft.com/Office/en-us/library/0c43062d-30e3-49b1-9705-ed447ad1d2561033.mspx

“Deployment for Windows SharePoint Services 3.0 technology”—http://technet2.microsoft.com/windowsserver/WSS/en/library/1f505e96-60e2-41ac-bf5d-9739105f047c1033.mspx

Tuesday, June 9, 2009

My New VS Color Theme… Isn’t it cool????

I got a new Visual Studio theme from here… It’s cool… Check it out new look of my Visual Studio…

NewTheme_blog

Friday, June 5, 2009

Encryption of Stored Procedure!!!! Really???

My friend sent me this cool link… It describe the way to encrypt the Stored Procedure on SQL Server… Find the article of how to encrypt the Stored Procedure at….

http://www.sqlservercurry.com/2008/02/how-to-encrypt-stored-procedure-in-sql.html

Enjoy….

Sunday, August 24, 2008

Back to Blogging

After almost 2 months I am back to blogging. These two months went hectic for me. Lots of things happened in these two months. This all things affect a lot to my surrounding environment.

My dad is having cancer since last 4 years. He is fighting very hard to defeat the cancer. But before few months cancer came in the winning position. We were starting losing the hope, but my dad didn't. He again starts fighting with the cancer with passion. During this chaos, I got good offer from the Cybage Software, which I couldn't denied. And it was the end of a golden era of my working with Avani Cimcon Technologies (ACTL). I worked almost 2 years with ACTL. It was really a golden period of my life. Working with ACTL was the best working experience for me. But one day you have to step forward, and I took that step. It's been a pleasure working with Cybage Softwares. I became part of cybagian community from cimconiens community.

One more thing happens which made me think a lot on my and my beloved's life. On 26th of July, 2008, Ahmedabad got serial blasts. It was around 21 blasts in just 70 minutes time. The whole city and infect whole country catch into terror. Around 56 people died and 200 people injured. The biggest blast happened into the Civil Hospital (The same hospital, where my dad's treatment is going on). Fortunately all of my beloved were safe. And I am thankful to God for this. But again and again, same thought came in my mind that, why this happens? Why a human can not understand each other? Why everybody wants to kill each other? Why we can not leave peacefully with each other? And I guess nobody in this world know these answers.

Anyway, after all we have to back to our routine life also. So, now I am back to my routine life and started writing again. So below is my "To Write" list. I am going to write on below topics in near future. The list is not in sorted order.

To Write:

  • Extension methods in .Net 3.5
  • Forms Authentication in SSRS
  • Visual Studio Extensibility
  • Project Management
    • Planning
    • Scheduling
    • PERT / CPM Techniques
    • Risk Management
    • Change Management
    • Work Reporting

Tuesday, May 27, 2008

Prevent HTML Injection in ASP.Net

What is HTML Injection?

HTML Injection refers to injecting HTML code into a web servers response to alter the content to the end user. HTML injection is one of the technique for hacking and phishing. This is also known as Cross Site Scripting.

The developer must take care of these kind of security Vulnerability.

How To Prevent?

If you are a ASP.Net developer then you must know about the Validation Controls. We can prevent the HTML injection by using Custom Validation Control. It is pretty simple to write the custom logic to prevent HTML injection by using Custom Validation Control.

But I am not going to explain how to put the validation into Custom Validation control. But I am going to explain, that how we can apply the HTML validation across the application without writing redundancy code.

.Net provides facility to extend their control for our own use. We can use those extended controls into our application development.

To extend the control, we just need to inherit our class from the particular control. To create the Custom control of ASP.Net's Custom Validator control, we will need to inherit our class from the System.Web.UI.WebControls.CustomValidator class. Please find below code to create custom control of Custom Validator Control.

namespace CustomControls
{
public class CustomValidator : System.Web.UI.WebControls.CustomValidator
{
private bool m_pastInit;
private bool m_ValidateHtmlInjection = false;

#region Public Properties
[Themeable(false)]
public bool ValidateHtmlInjection
{
get
{
return this.m_ValidateHtmlInjection;
}
set
{
this.m_ValidateHtmlInjection = value;
}
}
#endregion

public CustomValidator()
{
m_pastInit = false;
}

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
m_pastInit = true;
this.SetFocusOnError = true;
this.Display = ValidatorDisplay.Dynamic;
}

protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (this.m_ValidateHtmlInjection)
{
this.ServerValidate += new ServerValidateEventHandler(this.HtmlInjectionServerValidator);
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "HtmlInjectionClientValidator", BuildHtmlInjectionValidationClientSideFunction());
this.ClientValidationFunction = "HtmlInjectionClientValidator";
}
}

private string BuildHtmlInjectionValidationClientSideFunction()
{
const string NEW_LINE = "\n";
const string TAB = "\t";
System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
stringBuilder.Append(NEW_LINE + "<script language=\"javascript\" type=\"text/javascript\">" + NEW_LINE);
stringBuilder.Append(TAB + "function HtmlInjectionClientValidator(source,arguments){" + NEW_LINE);
stringBuilder.Append(TAB + TAB + @"var re = /<[\w]+>/;" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "if(re.test(arguments.Value))" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "{" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + "arguments.IsValid = false;" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "}" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "else" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "{" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + "arguments.IsValid = true;" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "}" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "var reHTMLPattern = new Array('<input', '<select', '<img', '<option', '<textarea', '<span', '<div', '<label', '<h', '<br', '<hr', '<table', '<tr','<th', '<td', '<a', '<body', '<html', '<script', '<link', '<meta', '<iframe', '<p', '<b', '<srtong', '<i','<dd','<dt');" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "if (String(arguments.Value) != 'undefined')" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "{" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + "for(var pattern in reHTMLPattern)" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + "{" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + TAB + "if(arguments.Value.indexOf(reHTMLPattern[pattern])>=0)" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + TAB + "{" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + TAB + TAB + "arguments.IsValid = false;" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + TAB + TAB + "break;" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + TAB + "}" + NEW_LINE);
stringBuilder.Append(TAB + TAB + TAB + "}" + NEW_LINE);
stringBuilder.Append(TAB + TAB + "}" + NEW_LINE);
stringBuilder.Append(TAB + "}" + NEW_LINE);
stringBuilder.Append("</script>" + NEW_LINE);
return stringBuilder.ToString();
}

protected void HtmlInjectionServerValidator(object source, ServerValidateEventArgs args)
{
string regEx = @"<[\w]+>";
string[] halfHtmlTags = { "<input", "<select", "<img", "<option", "<textarea", "<span", "<div", "<label", "<h", "<br", "<hr", "<table", "<tr", "<th", "<td", "<a", "<body", "<html", "<script", "<link", "<meta", "<iframe", "<p", "<b", "<srtong", "<i", "<dd", "<dt" };
bool isValid = !System.Text.RegularExpressions.Regex.IsMatch(args.Value, regEx);

if (isValid)
{
foreach (string halfHtmlTag in halfHtmlTags)
{
if (args.Value.IndexOf(halfHtmlTag) > 0)
{
isValid = false;
break;
}
}
}
args.IsValid = isValid;
}
}
}



The class, expose the property IsHtmlInjectionValidator, this property is not there in the traditional ASP.Net Custom Validator control. The validation control have client side and server side validation methods. Both method behave same. The server side validation method will be used when somebody has disabled the JavaScript support from the browser.



How To Call in ASPX Page?



To add the custom control into the ASPX page, we need to register the assembly into the page. Below is the code to register the assembly...



<%@ Register Assembly="ControlLib" Namespace="CustomControls" TagPrefix="CustomControls" %>


Below is the code for adding Custom Control into the ASPX page,



<CustomControls:CustomValidator runat="server" ID="HtmlTestCustomValidator"
ValidateHtmlInjection="true" ErrorMessage="This is HTML Injection..." ControlToValidate="InjuctionTestTextBox"></CustomControls:CustomValidator>



Other Usage



We can create SQL Injection using same methodology. I keep that for the readers. If you can find how we can do the SQL Injection validation please share with all. Otherwise I will post the SQL Injection into my next post.



Happy Coding....