Wednesday, February 8, 2012

Securing pages with SSL

Many times we need to secure pages with SSL security. To test this in development environment we may not have the actual certificate. I am writing down the steps to achieve this.

1)Create a test certificate using Makecert.exe tool
http://msdn.microsoft.com/en-us/library/ms751408.aspx

2)Flipping between http and https pages in the website.
http://www.codeproject.com/Articles/60706/Switching-Between-HTTP-and-HTTPS-Like-A-Bigshot-Ho

Monday, January 9, 2012

Useful Links



Useful links on Knowledge Base


 


Windows



  • Fences
    This tool just rocks, the number one feature I use in Fences is to show/hide all desktop icons.

  • POP Peeper
    This little tray utility notifies me of any incoming email. Supports IMAP as well.

  • Window Clippings
    My preferred choise when it comes to screen capture

  • DisplayFusion
    Makes working with dual monitoring easy

  • Launchy
    This little app has significantly saved me time through the years. It is an easy to use app launcher. I seldom enter the realm of the Start menu any more. Just type a few words into the search bar and hit enter and your app is launced.

  • Dropbox
    Save files to the cloud, then syncs them to any computer you have it installed on. Makes moving files between computers a breeze.

  • AutoHotKey
    Automate almost anything

  • Paint.NET
    Awesome free paint software for Windows, if you can find the real download button (upper right corner) instead of the huge green advertising one.

  • VirtualBox
    Use this all the time to setup different demo machines when developing.

  • Join.me
    Screen sharing, perfect when you need to show someone your screen or help out a relative or friend.

  • WinRAR
    My tools of choice for compression for many years. 7-Zip is another favourite.

  • Metrotwit
    This has been my Twitter client of choice for a while now and it is just beautiful. Lacking some more advanced features but will suffice for now.


 


Websites



 


Developer



  • TeamCity
    Awesome build server.

  • dotPeek
    Free .NET decompiler

  • Fiddler2
    A web debugging proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you you to inspect traffic, set breakpoints, and "fiddle" with incoming or outgoing data.

  • Visual Studio Extensions

    • nCrunch
      Automated parallel continuous testing tool

    • Visual Studio Color Theme Editor
      Allows users to customize the Visual Studio 2010 color palette

    • PostSharp
      Aspect framework for .NET

    • VisualSVN
      Integrates Subversion and TortoiseSVN seamlessly with Visual Studio

    • WoVS Default Browser Switcher
      Quick and easy changing of VS default browser

    • VsVim
      VIM emulation layer for Visual Studio

    • Nuget
      A Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.

    • ReSharper
      Developer productivity tool for Microsoft Visual Studio



  • PowerShell
    For different kinds of Windows automation, also use it for my build scripts (since I'm using PSake).

  • PSake
    Build automation tool


 


Educational



  • Videos

    • TED
      Ideas worth spreading.

    • Pluralsight
      Hardcore developer training.

    • PeepCode
      Screencasts

    • ShowMeDo
      Learn with the open-source community

    • TekPub
      Concise, professional, top-quality screencasts

    • DimeCasts
      Screencasts where each episode review only a single concept and stays within a 10 minute (or there abouts) timeframe.

    • CleanCoders
      Code-casts for Software Professionals.

    • LearnVisualStudio 




  • Forums


  • Books


  • Other

    • KhanAcademy
      Watch. Practice. Learn almost anything for free.

    • Codecademy
      An easy way to learn how to code.

    • ProjectEuler
      a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

    • Lumosity
      Reclaim your brain.

    • TopCoder
      A competetive community for software development and digital creation.

    • CodeSchool
      Learn by doing (CoffeeScript, Rails, JQuery, HTML5 & CSS3, ...).








 


Podcasts



  • Hanselminutes
    A weekly audio talk show with noted web developer and technologist Scott Hanselman and hosted by Carl Franklin. Scott discusses utilities and tools, gives practical how-to advice, and discusses ASP.NET or Windows issues and workarounds.

  • .NET Rocks
    The Internet Audio Talk Show for .NET Developers with Carl Franklin and Richard Campbell.

  • Software Engineering Radio
    The Podcast for Professional Software Developers

  • Devnology

  • Authorcast
    AuthorsCast brings you fun, entertaining, fast-paced interviews with prominent tech authors.

  • Herding Code
    A weekly podcast with K. Scott Allen, Kevin Dente, Scott Koon, and Jon Galloway.

  • Distributed Podcast
    CQRS, DDD, Cloud computing and much more.

  • This Developer's Life
    A podcast about developers and their lives.


 


Career





Wednesday, January 4, 2012

Visual Studio Tips

Hi,

I can't see the Release/Debug menu in the toolbar or elsewhere in Visual C# 2010 B2. Am I missing something?

Solution
For Express configs/platforms are hidden by default.

1) Go to Tools\Options.
2) If you have an abbreviated tree then check the Show all settings box at the bottom of the Options dialog.
3) Go to Projects and Solutions -> General.
4) Select Show advanced build configurations
5) You'll now see the settings in your project property dialog.

Wednesday, December 21, 2011

Technical Jargons

Web 2.0
Web 2.0
*******************************
Cloud Computing
Clud Computing

Wednesday, December 7, 2011

Using xmlhttp to POST soap request for WSE 3.0 enabled Webservice


Consider a situation,
You have a WSE 3 enabled Webservice(developed in dotnet) and you have to access that without creating PROXY.

We can do this by creating XMLHTTP object and then construct SOAP request

But the problem is in creating the proper request with valid Authentication header. Many times we will end up creating invalid request mostly invalid authentication headers

But there is a easy way. Two tools comes handy for us to implement and test this.
1) Fiddler for creating request
2) SOAPUI for validating and testing

Let me write down the steps in numerical order

1)Create a dotnet application (windows form or console app) and add web reference to your web service
2)Add a WSE client policy config file and attach a authentication token to you proxy
Private Sub DoSettingsForWSE3(ByRef serviceProxy As MyWebService)

Dim strUserName As String = "uname"
Dim strPassword As String = "pwd"
Try
'init web service proxy
serviceProxy = New MyWebService

' Init UsernameToken, password is the reverted
' String of username, the same logic in AuthenticateToken
' of ServiceUsernameTokenManager class.
Dim token As New UsernameToken(strUserName, strPassword, PasswordOption.SendPlainText) 'or encrypted/hased

' Set the token onto the proxy
serviceProxy.SetClientCredential(token)

' Set the ClientPolicy onto the proxy
serviceProxy.SetPolicy("client polciy config")

Catch ex As Exception
Throw
End Try

End Sub

3) Run the test client app and copy the Request constructed from FIDDLER tool

4) Look for the authentication header section from the request constructed by Fiddler.

5) Copy them and test it in SOAPUI tool. 90% you will not go wrong in the authentication part if you do this way.

6) we need to tweak the request in some ways so that it does not expire. Alter the expiration date on the authentication header to some very high future date.

Actually I was struggling to achieve this portion of creating a valid request and then I figured out the way now and would like to share.

Thursday, November 3, 2011

Resources

Resources
Design Patterns
http://dofactory.com


*****************************************************


Interview Questions
C#-asp.net
*****************************************************

Agile

1) Agile-Scrum
.net
1) http://repeatgeek.com/technical/
Source control
2)http://repeatgeek.com/technical/17-websites-for-sharing-programming-knowledge/

1) GIT : http://git-scm.com/

2) SOS :

Bedtime Stories
1)http://www.storyteller.net/stories/text/21

2) http://www.kellscraft.com/BestStories/beststoriescontentpage.html
Good Thoughts

1) http://powertochange.com

Friday, October 28, 2011

Learn One good thing a day

I wanted to Lean one good thing a day and keep practicing it

I am learning sometimes but fail to practice mostly. Need the determination.

http://www.susanjeffers.com/home/books.cfm


http://www.ted.com/talks/dean_ornish_says_your_genes_are_not_your_fate.html

Monday, September 12, 2011

Worth remembering

LETTER FROM ABRAHAM LINCOLN TO HIS SON’S TEACHER “My son starts school today. It is all going to be strange and new to him for a while and I wish you would treat him gently. It is an adventure that might take him across continents. All adventures that probably include wars, tragedy and sorrow. To live this life will require faith, love and courage. So dear Teacher, will you please take him by his hand and teach him things he will have to know, teaching him - but gently, if you can. Teach him that for every enemy, there is a friend. He will have to know that all men are not just, that all men are not true. But teach him also that for every scoundrel there is a hero, that for every crooked politician, there is a dedicated leader. Teach him if you can that 10 cents earned is of far more value than a dollar found. In school, teacher, it is far more honorable to fail than to cheat. Teach him to learn how to gracefully lose, and enjoy winning when he does win. Teach him to be gentle with people, tough with tough people. Steer him away from envy if you can and teach him the secret of quiet laughter. Teach him if you can - how to laugh when he is sad, teach him there is no shame in tears. Teach him there can be glory in failure and despair in success. Teach him to scoff at cynics. Teach him if you can the wonders of books, but also give time to ponder the extreme mystery of birds in the sky, bees in the sun and flowers on a green hill. Teach him to have faith in his own ideas, even if every one tell him they are wrong. Try to give my son the strength not to follow the crowd when everyone else is doing it. Teach him to listen to every one, but teach him also to filters all that he hears on a screen of truth and take only the good that comes through. Teach him to sell his talents and brains to the highest bidder but never to put a price tag on his heart and soul. Let him have the courage to be impatient, let him have the patient to be brave. Teach him to have sublime faith in himself, because then he will always have sublime faith in mankind, in God. This is the order, teacher but see what best you can do. He is such a nice little boy and he is my son"

Monday, January 24, 2011

Accessing Data with ADO.net 4.0

EDM splitting

The key factor for Entity Splitting is both entities should share a common primary key

Friday, January 7, 2011

WebSite Performance Improvements

1) ViewState

Keep you viewstate light or no viewstate wherever possible

Note : Prevent any user from obtaining any part of the view state by using PageStatePersistor class http://aspnetresources.com/blog/page_state_persisters_overview

Scalability and Distributed Caching

This topic I need to learn more. Will soon update with more feeds

Things to do to scale you web application

1)Use SQL Server replication

also refer to http://www.c-sharpcorner.com/uploadfile/gopenath/page107182007032219am/page1.aspx

MultiThreading in Asp.net Web apps

Multi threading in asp.net can be achieved using two ways
1)Using BackgroundWorker class
2)Spanning new process thread on user interaction

While handling resource intrinsic operations concurrently like sending 1000s of email on a button click we have to use a separate process for every user

If the operation is global to the application but needs to be done in background then use Backgroundworker class

Error Handling

1) In MVC we can centralize the logic for handling and logging unhandled exceptions
by Decorating the controller classes with the [HandleError] attribute
Using the above class level attribute we can handle exceptions of specific type with separate customized views. There are other Action Filter attributes also [Authorize],[OutputCache]

Pls look into below link for details
http://www.pnpguidance.net/post/ASPNETMVCFrameworkPreview4HandleErrorAuthorizeOutputCacheActionFilterAttributes.aspx


Developing Web Application to be optimized for Search Engines

The key features responsible for optimizing our web application for Search Engines. Listing out one by one

1)HTML rendered by the web application
set the Render Outer table property to false on all Form View controls

MCPD 4.0 preparation

I am consolidating the key features in .net 4.0 during the process of learning for MCPD certification


1) Client ID mode property for user controls

Very useful property settings while referring to user controls from client side javascripts of the parent page. Setting ClientIdMode property to the value "Predictable" will remove all unwanted long strings before the id of the user controls. For more info refer to
http://blog.hmobius.com/post/2010/02/25/ASPNET-Part-8-Introducing-ClientIDMode.aspx


2) [DebuggerBrowsable] attribute

If you want to hide a class member variable from display to users even in debugging mode follow the 2 steps. Make the variable private and also decorate it with DebuggerBrowsable] attribute . For more details pls check
http://www.dailycoding.com/Posts/using_debuggerbrowsable_attribute_for_a_better_view_in_debugger_window.aspx



3)HTMLHelper Extension methods
These extension methods are used for programmatically adding reusable user-interface code to views and allowing the user-interface code to be rendered from the server side. These methods will render HTML controls. You can use helper methods that map to different HTML tags on the fly. (eg)<%= Html.Span("About page...") %>



4) MVC-RenderPartial vs RenderAction extension methods
There is a big difference between renderaction and renderpartial. RenderPartial will render a View on the same controller (or a shared one), while RenderAction will actually perform an entire cycle of MVC, that it, it will instantiate the controller (any controller you mention, not the current one only), it will execute the action, and it will then return and render the result.
http://stackoverflow.com/questions/719027/renderaction-renderpartial


http://www.slideshare.net/1kevgriff/aspnet-mvc-from-the-ground-up





5)Configure the Web application for constrained delegation
If you want the database to be accessed under the identity of the user connected to the web application then use constrained delegation



6)Avoid SessionID spoofing by inheriting SessionIDManager class and Customizing it.
in situation when sessionstate =cookieless in web.config



7)Keeping connectionstrings in external source and avoid web app restart on modifying the machine.config file
First we need to specify the configsource property to an external file.Keep the external file extension as .config as other file types can be browsable through webURL. Inorder to read the config entries from external config file we need to maintain the same config section in the external config file
http://aspalliance.com/820





8)To set the culture and UI culture for an ASP.NET Web page programmatically
1.Override the InitializeCulture method for the page.
2.In the overridden method, determine which language and culture to set the page to.



9)Nullable types:The ability to assign null to numeric and Boolean types
eg) int? num = null;



10) MVC2- Area
To accommodate large projects, ASP.NET MVC lets you partition Web applications into smaller units that are referred to as areas. Areas provide a way to separate a large MVC Web application into smaller functional groupings. An area is effectively an MVC structure inside an application. An application could contain several MVC structures (areas).
When you add an area to a project, a route for the area is defined in an AreaRegistration file. The route sends requests to the area based on the request URL. To register routes for areas, you add code to the Global.asax file that can automatically find the area routes in the AreaRegistration file. add the below code isn global.asax
AreaRegistration.RegisterAllAreas();

11)Render values from resource file in asp.net controls
eg) <asp:TextBox runat="server" Id="text" Text="<%$ Resources:WebResources, lblCompanyText %>"/>





12)

Accessing Data with ADO.net 4.0



POCO-Plain Old CLR objects

http://blogs.msdn.com/b/adonet/archive/2009/05/21/poco-in-the-entity-framework-part-1-the-experience.aspx
http://blogs.msdn.com/b/adonet/archive/2009/05/11/sneak-preview-persistence-ignorance-and-poco-in-entity-framework-4-0.aspx
http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx

Patterns behind the concept of Entity Framework is
The Repository Pattern http://msdn.microsoft.com/en-us/library/ff649690.aspx
Unit of Work

Eager Loading Vs Deferred(Lazy) Loading
http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx


CSDL, SSDL, and MSL Specifications
CSDL-Conceptual Schema Design Language
SSDL-Store Schema Design Language
MSL-Mapping Schema Language




13) Dynamic keyword in c#4.0
Example for using Dynamic keyword
object calc = GetCalculator();
Type calcType = calc.GetType();
object res = calcType.InvokeMember(
"Add", BindingFlags.InvokeMethod,
null, new object[] { 10, 20 });
int sum = Convert.ToInt32(res);
Th e function returns a calculator, but the system doesn’t know the
exact type of this calculator object at compile time. Th e only thing
the code relies on is that this object should have the Add method.
Note that you don’t get IntelliSense for this method because you
supply its name as a string literal.
With the dynamic keyword, this code looks as simple as this one:
dynamic calc = GetCalculator();
int sum = calc.Add(10, 20);
The assumptions are the same: There’s some object with an
unknown type that we expect to have the Add method. And similar
to the previous example, you don’t get IntelliSense for this method.
But the syntax is much easier to read and use and looks similar to
calling a typical .NET method.

Thursday, April 19, 2007

Carnatic Music

I love listening to Caranatic Music
Vacalists Maharajapuram santhanam, MS and Madurai Mani Aiyer songs really melts me.

Govinda ninna namave chanda
Narayana
Kurai ondrum illai
Sri chakra Raja Simhasaneswari
Akhilandeswari


My Favourites