Wednesday, September 28, 2011

How to retrieve encrypted password in ASP.NET membership?



            var tusername = "username";
            System.Web.Security.MembershipUser tmpuser = System.Web.Security.Membership.GetUser(tusername);
            var password = tmpuser.GetPassword();

Monday, September 19, 2011

Very High Quality Image Resizing in .NET

http://www.keyvan.ms/very-high-quality-image-resizing-in-net

New Features for Web Development in Visual Studio 11 Developer Preview

http://blogs.msdn.com/b/webdevtools/archive/2011/09/14/new-features-for-web-development-in-visual-studio-11-developer-preview.aspx


  • JavaScript editor is rewritten, and is now based on IE10's JavaScript engine. Many new features are added for the JavaScript editor to support it as a first class citizen programming language, such as go to definition, outlining, brace matching, etc.
  • New CSS editor functionalities include new formatter, validator, snippets, color picker, comment support, hierarchical indentation, vendor specific IntelliSense.
  • New HTML editor functionalities include source view smart task, better auto indentation, end-tag matching when editing start-tag, server side event handler generation, extract to user control and more.
  • IIS Express is now the default website and web application host instead of ASP.NET Development Server (i.e. cassini).
  • LocalDB is the default database for Visual Studio 11 Developer Preview. LocalDB uses the same database engine as other SQL server code name "Denali" CTP3 (like Express, Standard and Enterprise), so it supports expected SQL functionality like tables, stored procedures, etc.  LocalDB is sandboxed so one user's interactions do not affect other users.  LocalDB also makes it easy for developers to create and work with multiple SQL instances.
  • SQL Server Database Projects - Visual Studio offers a new project type that makes it easy for developers to build and deploy their SQL Server databases.  Developers can quickly and easily add tables, stored procedures, scripts etc. to their SQL Server project and the structures are stored as SQL scripts, which makes it easy to manage the history of the database via source code control and make it easy to deploy the database to SQL Server instances from Express to Azure.
  • Publishing for Web Application Projects (WAP) have been updated. Publishing profiles are now designed for team scenarios and are stored into a separate folder, allowing proper version control and usage from MSBuild/Team Build. You can configure your WAP to be precompiled/merged before publishing on the Package/Publish Web tab under the Project Properties.

ASP.NET, Visual Studio 11 Web and .NET 4.5 Developer Preview

http://www.hanselman.com/blog/NewToolsAndNewContentASPNETVisualStudio11WebAndNET45DeveloperPreviewWithCommentary.aspx

Tuesday, September 13, 2011

TIOBE Programming Community Index for September 2011


How to use MiniProfiler in ASP.NET WebForms?


1.       Add Package Library Reference for MiniProfiler
2.       Add code to Global.asax file for Start and Stop profiler
3.       Add code to steps you want to trace

Following first steps to add references by this article:

Last step: Add following code to master page html view:
<%=MvcMiniProfiler.MiniProfiler.RenderIncludes()%>



ASP.NET page methods are only as secure as you make them

http://encosia.com/asp-net-page-methods-are-only-as-secure-as-you-make-them/

Saturday, September 10, 2011

Object oriented vs. functional programming

http://www.johndcook.com/blog/2010/11/03/object-oriented-vs-functional-programming/
OO makes code understandable by encapsulating moving parts.
FP makes code understandable by minimizing moving parts.

HM Bark Endeavour

Thursday, September 8, 2011

How to solve "deadlocked on lock resources with another process and has been chosen as the deadlock victim" in Entity Framework?


One of options is to set TRANSACTION ISOLATION LEVEL to READ UNCOMMITTED
        FrameEntities entities = new FrameEntities();
        entities.ExecuteStoreCommand("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;");

READ UNCOMMITTED level is the least restrictive of the four isolation levels.

An Introduction to Razor Syntax

http://dotnetslackers.com/articles/aspnet/An-Introduction-to-Razor-Syntax.aspx

TinyMCE - Javascript WYSIWYG Editor

http://www.tinymce.com/tryit/jquery_version.php

Tuesday, September 6, 2011

Web Forms Model Binding Part 1: Selecting Data (ASP.NET vNext Series 3)

http://weblogs.asp.net/scottgu/archive/2011/09/05/web-forms-model-binding-part-1-selecting-data-asp-net-vnext-series.aspx

Frameworks making developers dumb

http://sivalabs.blogspot.com/2011/08/frameworks-making-developers-dumb.html

"I strongly believe frameworks will increase developer productivity. But the developers should try to understand how the framework is doing the stuff. You need not learn all the internal working mechanisms of frameworks. If you are really good at Servlets and JSP then it is very easy to understand any Java Web framework like Struts, SpringMVC etc.If you aren't good at the basics then obviously for every other question reply would be.. "framework's annotation/xml will execute this" 

Code Refurbishment

Code refurbishment is the better word than refactoring for business side. 




A code refurbishment is worthwhile to correct the core domain if it's about to undergo significant further development, or if a module is business critical and needs to be occasionally corrected under production pressure to preserve revenue generation.



http://mechanical-sympathy.blogspot.com/2011/08/code-refurbishment.html

How Facebook Ships Code

http://framethink.wordpress.com/2011/01/17/how-facebook-ships-code/

Sunday, September 4, 2011

Where OO has succeeded most

http://www.johndcook.com/blog/2011/04/29/where-oo-has-succeeded-most/


I believe he overstates his case when he says it has been difficult to show benefits of OO outside graphics and simulation. But I agree that it’s harder to create good object oriented software when there isn’t a clear physical model to guide the organization of the code. A programmer may partition functionality into classes according to a mental model that other programmers do not share.
When you’re developing graphics or simulation software, it’s more likely that multiple people will share the same mental model. But even in simulation the boundaries are not so clear. I’ve seen a lot of software to simulate clinical trials. There the objects are fairly obvious: patients, treatments, etc. But there are many ways to decide, for example, what functionality should be part of a software object representing a patient. What seems natural to one developer may seem completely arbitrary to another