My Thoughts & Views

Archive for the ‘ASP.NET’ Category

My last Saturday & Sunday was filled with full of excitement, as I spent my time at Tech.Ed, organised by & BITPro Communities, listening to their wonderful sessions. It was sponsered by Infragistics, telerik,ineta & Microsoft UGSS. It was really a wonderful experience.The main reason for me to attend this event was to know about Virtualization, Cloud Computing but this event helped me to understand the technologies, which I could never have known.

I met some of the wonderful people, got to know lots of upcoming new technologies & had lots of dreams about the various skillsets that I can include in my resume :).

Day 1: (20 June 2009)

The session started with a Keynote by Mr.Ramkumar. His session was interesting start for the other sessions, as the keynote walked us through the various technologies like, Virtualization, Cloud Computing, SaaS, SOA,EAI & reducing the carbon foot print.

Next session was really interesting & inspiring, got to learn about latest features of Windows 7 by Vijay & Vic , Location & Sensor demo’s were really interesting.This session was very informative and was excited to know a product from MS with such nice features.

Then we had a session on ASP.NET 4.0 by Chaitra, which was helpful (BTW,I am ASP.NET Web Apps Developer & It was something i was looking for) as it gave me an insight into the upcoming features. Waiting to use it for any of the projects.

Then the next session was on Solving Integration Challenges with BizTalk by Kashi, I knew the name “BizTalk” but didn’t know how it will be used in Enterprises, & this session really gave me an insight into the world of BizTalk.

After Lunch, we had session on Biztalk & WCF by Meena,this session even further increased my curiosity, I worked on a project on WCF & this particular session made me to understand BizTalk better by means of WCF.

And after Biztalk & WCF session, the next one was by Vic on Silverlight 3. I liked this technology & have plans to work on a project which I was thinking for some time & was waiting for some Ideas, & this session provided me with many more options.

After all these technical sessions came the Management session by Sanath, initially I had plans to skip this session, but stayed there on my friends request, I am thankful to him. I liked the session & this was the inspiring session. After reaching home first thing I did was to find the videos shown in this session on youtube.

Day 2: (21 June 2009)

The day started with Keynote by Vic, he talked about Infragistics & showed demo of their wonderful Controls.

The Next session was on Micosoft Azure by Janakiram, I had very little idea about it, but this session clarified most of the things which I didn’t know about.

After the Azure session came the Work Flow Foundation by Gayathri, which I missed to attend, so I can’t give much details about it, but my friend said it was good.

Before lunch we had a session on SQL Server 2008 & Unstructured data by Praveen, this session helped me to know how microsoft is handling the unstructured data. It usually happens in real world that, most of the time we deal with unstructured data, & I was interested to know much about it & this session helped me to know the ways to deal with unstructured data.

After Lunch, the next session was on Microsoft Echange Server 2010, this session was good, but after some time I was feeling drowsy, as I had rice more during lunch, so lost most part of the session.

The next session was on Windows Server 2008 R2 by S.Kaliyan, which was interesting to know. I listned to this with much attention as it was the base for Microsoft Azrue Platform & at the end of the day we got Trial version of Windows Server 2008 R2 DVD.

The last session of the event was on Virtualization 360 by Praveen, this also was my favourite topic as I experimented with Virtualization my self without going through much details. I used Microsoft Virtual PC 2007 to run Knoppix Live Linux. I came to know the types of virtualizations & many interesting things.

Overall I liked the whole Tech.Ed, it really helped me to get started on many technologies.

BTW, I couldn’t take much pictures at the event as I was busy taking notes, but here is the photo with all the people who conducted the wonderful 2 day event.

If any of you have attended it then let me know about your thoughts & views.

Most of the web developers will know about Fiddler.

Using Fiddler u can log the HTTP traffic between your application & Webservice, here Fiddler acts as a proxy in between your application & the Webservice.

To Use with ASP.NET set the following into your web.config, it will start logging all the HTTP Traffic.

<proxy proxyaddress=”http://localhost:8888&#8243; />

Method :

Usage :

I need to write comments for the below code, bcoz of lack of time i am posting only abstract things,if you want to know something, write comment, i will reply.

HTML login control

< input type="text" name="txtUserName" id="txtUserName" class="textBoxes" />

jQuery Rule: Add the below rule into script tag in header & add reference to jquery-1.2.6.js,jquery.validate.js in Head Element

$(document).ready(function() {

rules: {
required: true,
remote: { type: "post",
url: "Register/IsLoginAvailable" }

txtUserName: { required: "User Name is Required.",
remote: jQuery.format("{0} is not available.")}

The above validation code executed when the focus changes from txtUserName to some other, it will call IsLoginAvailable method available in the RegisterController, as specified in the url.

Controller Code :

Below code is the one which checks for availability of a username & returns the status to above jQuery Method. The following methods return type is JsonResult because remote method of jQuery accepts the JsonResult object only.

public JsonResult IsLoginAvailable(FormCollection collection)
JsonResult result = new JsonResult();

ilogIn.Text = this.GetLoginByUsername(collection.Get("txtUserName").

catch (Exception ex)

if (ilogIn.Text == collection.Get("txtUserName").ToString())
result.Data = false;
result.Data = true;

return result;

NLog is a .NET Logging Library, 

Official Site mentions it as follows,

NLog is a .NET logging library designed with simplicity and flexibility in mind. With NLog you can process diagnostic messages emitted from any .NET language, augment them with contextual information, format them according to your preference and send them to one or more targets.

Using it is very easy. Following steps helps you to get started.

(For Visual Studio 2008, Web Applications)
1. Download and install NLog Library

2. If you are using Visual Studio 2008, follow this step as mentioned in my earlier post, to fix issue with Intellisense.
3. Add reference to NLog.dll.
4. Add the following Entries to web.config

5. Add  following entries to your code behind file

(for C#)

using NLog;
using NLog.Targets;
using NLog.Config;
using NLog.Win32.Targets;
6.  Create a Logger object as below in your code behind file
catch(Exception ex)
    Logger errLogger = LogManager.GetLogger(“*”);
7. If you see, i have passed * as an argument to GetLogger method, please refer web.config entry, i have mentioned logger name as *.
8. This will log exceptions to  /Logs/Log.txt
If you encounter any problems then let me know.
If NLog Intellisense is not working in Visual Studio then copy NLog.xsd into following location
Visual Studio 2008
C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas
Visual Studio 2005
C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas
1. Open Visual Studio
2. Go to Tools > Options
3. Check Show all setting check box
4. Select Projects and Solutions from the tree
5. Check “Always Show solution” checkbox

6. Click Ok
7. Now Select Create New Project
8. From tree List select Other Project Types
9. Then Visual Studi Soultions, You will see Blank Solution in Templates section.