Wednesday, August 10, 2011
Publishing WCF Services using IIS and .NET 4.0
1.1. Open Visual Studio in Run as Administration mode.
2. Right click on the WCF Service Project and choose Publish.
3. In the Publish Web Site Dialog box, choose following settings -
3.1 Publish Method: Web Deploy
3.2 Service Url - Address of the Service through which the publishing happens.
Ex: publishing locally - localhost
3.3 Site/Application - Url of Publish To site Ex: Default Web Site/MyApp. Note - This site should be already created in IIS as an application.
4. By Default the service will be deployed to run as Default App Pool which uses .NET 2.0. and will fail. Therefore, you need to change the App Pool of this Web Site to ASP.NET V4.0 Application Pool.
5. Ensure the Account used for the Application Pool has necessary permission on the resources used by WCF Service like DB Access etc.
Friday, August 5, 2011
Project Management Tips
Situation - What action will you take to achieve code quality ?
1. Keep language specific code review guidelines and Naming Conventions document handy for the developer to refer before he writes any single line of code.
2. Peer Review
3. Code Analysis Tools. Ex: VS2010 Code Analysis, StyleCop, FxCop, NDepend, SPDispose Checker.
4. Code should be unit tested using Tools like NUNIT, Visual Studio Testing Framework.
Situation - Developer unable to deliver as per the estimate/plan.
1. Insufficient training may be one of the issue. What type of training is required ? Domain Knowledge or Technical.
2. Attach a senior resource/domain analyst to guide the developer in his work.
Situation - Large number of UAT issues.
1. Revisit your system test cases. They may not cover the complete functional testing.
2. Engage a Domain Analyst to review the system cases.
Situation- Unplanned leave schedule of the Team is impacting delivery
1. The first activity that a PM should take up at the start of the project is to maintain a leave calendar for the team in a shared location. Team member should update their leave plan well in advance for better planning.
Situation - What is the best way to manage bugs in the System ?
1. Identify a tool to manage bugs or issues.
2. Classify the bugs as per their severity i.e High, Medium and Low.
3. Assignment of bugs to resources as per their severity/complexity.
4. Initial Estimation of bugs/issues by resources.
5. Actual Estimation of bugs/issues by resources.
6. Set the status of the bug i.e. Unable to Reproduce, Code Complete, Closed, Open, Waiting etc. with proper comments.
Situation - Re-open Bugs
1. Root cause analysis.
2. Insufficient Test cases.
Situation - Client has the option to change the requirement anytime during the development.
1. Ensure you have configured your Repository (SharePoint etc.) to send alert whenever there is a change in requirement.
2. Analyze and do an impact analysis as the next step. Artifacts can be impacted - Source Code, Unit Test Cases, System Test Cases, Build Script etc.
3. Impact on estimation
4. Communicate the Client about the impact
5. Implementation of the change of requirement.
Situation - Code coverage/review/refactoring is missing during project execution
1. This is a common problem in software projects. The team miss some important activities like code review/unit testing/refactoring etc. under delivery pressure. There is a need for monitoring the process during the execution and enforce the process to ensure quality delivery. Escalate the issue.
Risk management breakdown in software projects -
Monday, May 30, 2011
How to check if the form passes all ASP.NET validations on client side
$(document).ready(function() {
$("form").submit(function()
{
Page_ClientValidate();
if (Page_IsValid)
{
//Ajax call
}
});
});
How to get SharePoint user profile information from Account Name
using Microsoft.Office.Server;
using Microsoft.Office.Server.UserProfiles;
private string GetPreferredName(string accountName)
{
SPSite site = SPContext.Current.Web.Site;
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
try
{
UserProfile profile = profileManager.GetUserProfile(accountName);
return profile[PropertyConstants.PreferredName].ToString();
}
catch
{
return accountName;
}
}
Saturday, May 28, 2011
Jquery Progress Notification
It is very easy to implement aswell. Here are the steps of implementation.
This plugin requires 2 files to be downloaded from http://plugins.jquery.com/project/pnotify and they are
1. jquery.pnotify.min.js
2. jquery.pnotify.default.css
And the code goes here:
References:
http://pines.hg.sourceforge.net/hgweb/pines/pnotify/raw-file/tip/index.html
http://plugins.jquery.com/project/pnotify
Confirmation before ASP.NET Asynchronous call
Fix- The ASP.NET Ajax PageRequestManager class fires the initilaizeRequest event before trigger the asynchronous call. The second event of this event is the initializeRequestEventArgs. It has a method called get_postBackElement() that identifies the element that triggered the call.
Clientside callback after ASP.NET Ajax Update Panel refresh
Scenario - How to implement - Calling an clientside method after ASP.NET Ajax refresh. Ex: You have a Jquery plugin to show progress of the current operation. But you also need to call it's remove method after Ajax Update Panel refresh.
Fix -