Wednesday, October 31, 2012

Security in the .NET Framework

The common language runtime and the .NET Framework provide many useful classes and services that enable developers to easily write secure code and enable system administrators to customize the permissions granted to code so that it can access protected resources. In addition, the runtime and the .NET Framework provide useful classes and services that facilitate the use of cryptography and role-based security.


Effective with the .NET Framework 4, there are major changes to the code access security system. Security policy is no longer applied to applications. All applications that can be run from the desktop are now executed as full-trust applications. This includes both applications on the computer and applications that can be run from a network share. Partially trusted applications must be run in a sandbox, which determines their grant set. The permission system continues to be used, but it is transcended by security transparency rules. For information about these changes, see Security Changes in the .NET Framework.

Ref : click here for details

Wednesday, October 10, 2012

Top 7 ASP.NET CMS


1. DotNetNuke

DotNetNuke
Of all the ASP .NET CMSes out there, DotNetNuke is probably the most well known and popular. One of the reasons for the popularity of this CMS is due to its multiple versions which allow for the flexibility to accommodate a beginning web developer, a small to medium sized business, or even a large enterprise. It has enjoyed a busy development since before 2003 that continues to this day.
For those that don't need much support other than what the open source community can provide, there's the DotNetNuke Community Edition offered under the BSD License. It contains most of the features which comprise the other editions, but the support is left up to the community. The Professional Edition gives you support from the DotNetNuke Corporation along with a few more features, and for a (much) increased price, the Enterprise Edition gives you a few more features along with phone support.
This CMS has been around for a while, so it's very stable and there's a plethora of add-ons in the community, so it's definitely the first stop if you're looking for something that's proven.

2. Orchard

Orchard
Provided under the New BSD License, Orchard CMS is Microsoft's hand in the open source world. The Orchard Project is based on a community, backed by full-time developers from Microsoft, that develop components and scripts that are open tools for developers to create applications, and their primary focus at the time is Orchard CMS. Despite some slow development in the beginning, Orchard has struck a chord with the open source community, and the number of contributors is growing every day.
While some of the things you'd expect in a more robust CMS might be missing, there's several fantastic back-end features which will delight anyone who is looking for a young project to support that has a great prospect of growing in the future.

3. Kentico

Kentico
Another CMS offering multiple licensing options is the Kentico CMS. The free license requires you to keep the logo and copyright information on your page, but the commercial versions offer support and allow you to work without the branding. It's designed to be easy to use for even novice users, so web development should go fast with someone who is experienced.
Kentico's focus lies in three areas: Content Management, E-Commerce, and Social Networking. That broad base makes it an excellent choice for a wide variety of technology ventures. If the company's success, showing a three year growth of 553%, is any indication, this is a CMS to keep an eye on.

4. Umbraco

Umbraco
As an open source project, Umbraco isn't going to break your budget, and it has really come alive over the past few years. It was first released in 2004 but it took a little while for it to gain traction. Lately, though, it has become very popular with designers due to the open templating system and ability to build in guidelines that automatically format the content writers provide. Also, it uses ASP .NET “master pages” and XSLT, so you won't have to work with a heaped-together templating format. It's written in C# and is happy to work with a variety of databases, so hosting shouldn't be a problem for you.
In 2009, CMS Wire dubbed Umbraco as one of the best open-source .NET CMS options available. In 2011, it was averaging close to 1000 downloads a day via Codeplex and is highly ranked amongst top downloads via the Microsoft Installer.

5. mojoPortal

mojoPortal
mojoPortal is another open source CMS option based upon the .NET framework. It has a very active developer group and is consistently being updated. While it is free to download and use, there are a number of commercial add-ons that are used to help fund the project. When it comes to developing your own applications, many people prefer mojoPortal because it can act as a starter kit for advanced .NET sites or portals.
mojoPortal is also considered to be very strong as a standalone CMS. It is easy to learn and very simple to use. It includes a variety of different tools such as blogs, photo galleries, chat, newsletters, pools, forums, and much more. It also has a very strong community which makes troubleshooting extremely simple.

6. Sitefinity

Sitefinity
Sitefinity is a commercial .NET content management system with 5 available license editions ranging from free for personal use, to $499 for small businesses up to $19,999 for enterprise use. The license will last for 1 year and during this time, you will get every update and free technical support with paid licenses. Once the year is up, you can still use Sitefinity to run your sites, however you will no longer receive free support or software updates. It is also important to note that the standard license is only good for one domain.
Currently Sitefinity is responsible for powering more than 200 government websites as well as large companies. Some of their most prominent government websites include: The White House Federal Credit Union, United States Courts, Downtown Fort Worth, and the Canadian Securities Transition Office. Additional customers include: Toyota, Vogue, IKEA, Chevron, Bayer, and Coca-Cola. With the price tag as high as it is, you'll want to be sure you're happy with it before you buy it by trying it first, but if the big boys are paying nearly $20,000 a year for it, you know the customer service is going to be top notch.

7. Composite C1

Composite C1
A relative newcomer to the ASP.NET market, Composite C1 was originally sold as a commercial CMS in Northern Europe until September 2010. Now, it's a free and open source CMS in version 3.0 that's offered under the Mozilla Public License. It's focus is for web developers working on corporate websites, so its learning curve is most likely too steep for the neonate. The 3.0 version, released in December 2011, was only downloaded a little over 1000 times from codeplex, but despite it's dark horse status, it continues to be a well designed CMS for the more experienced developer that wants their CMS to be more functional than it is beautiful.
There are enough free community and commercial add-ons for you to plug in the functionality you need quickly, so Composite C1 is worth checking out if you want to get your hands dirty.
ASP.NET seems to have more and more quality options regarding extensible content management systems with each passing year. Depending on your needs, there are excellent options available both with commercial licenses or open source code. In order to determine which one is best you, it entirely dependent on what features you want included. While there are other options available, these Top 7 ASP.NET CMS options are all excellent choices.
About the author:  is writer and editor at WebmasterFormat. Feel free to contact him and follow on Twitter.

Saturday, October 6, 2012

Did You Know…?

ASP.NET MVC is open source! That’s right - as of March, 2012, the entire source code for the ASP.NET MVC, Web API, and Web Pages frameworks is available to browse and download on CodePlex. What’s more, not only is the source code available, developers are free to create their own forks and even submit patches to the core framework source code!

Friday, October 5, 2012

Creating a Widget


Need to use JQuery tmpl plugins and Below code explains very straight forward.

Client side Code : 

<script id="uniquescriptId" type="text/javascript" src="http://<yourdomain>/widgets/embed.aspx?<your feed querystring>"></script>


Server sid code in embed.aspx ?<your feed querystring>:


public partial class embed : System.Web.UI.Page
    {
        private const string divFeedName = "uniquedivid";
        protected void Page_Load(object sender, EventArgs e)
        {
            StringBuilder mainJS = new StringBuilder(string.Empty);

            // Include all the javascript plugins

            mainJS.Append(File.ReadAllText(Server.MapPath("js/jquery-1.4.1.min.js")));
            mainJS.Append(File.ReadAllText(Server.MapPath("js/jquery.tmpl.min.js")));


           // here construct your json object to load.

            string movies = "var movies =[{ Name: \"The Red Violin\", ReleaseYear: \"1998\" },{ Name: \"Eyes Wide Shut\", ReleaseYear: \"1999\" },{ Name: \"The Inheritance\", ReleaseYear: \"1976\" }];";
            mainJS.Append(movies);
            
            mainJS.Append(File.ReadAllText(Server.MapPath("js/embed.js")));

            Response.ContentType = "text/plain";

            Response.Write(mainJS.ToString());
            Response.End();
        }
}

embed.js file code:


var newDiv = document.createElement("div");
newDiv.id = "temperarydiv";
$(newDiv).insertAfter($("#uniquescriptId"));


var tmpl = "<script id=\"movieTemplate\" type=\"text/x-jquery-tmpl\"><li><b>${Name}</b> (${ReleaseYear})</li></script><ul id=\"movieList\"></ul>";

var v = document.getElementById("temperarydiv").innerHTML = tmpl;


$("#movieTemplate").tmpl(movies).appendTo("#movieList");



:) simple...



Wednesday, October 3, 2012

Architecture a System?

An experienced Architect does not need to go through every single step in the book to get a reasonable design done for a small web application. Such Architects can use their experience to speed up the process. Since I have done similar web applications before and have understood my deliverable, I am going to take the faster approach to get the initial part of our DMS design done. That will hopefully assist me to shorten the length of this article.
For those who do not have experience, let me briefly mention the general steps that involved in architecturing a software below...
  1. Understand the initial customer requirement - Ask questions and do research to further elaborate the requirement
  2. Define the process flow of the system preferably in visual (diagram) form. I usually draw a process-flow diagram here. In my effort, I would try to define the manual version of the system first and then would try to convert that into the automated version while identifying the processes and their relations. This process-flow diagram that we draw here can be used as the medium to validate the captured requirements with the customer too.
  3. Identify the software development model that suite your requirements
    • When the requirements are fully captured and defined before the design start, you can use the 'Water-Fall' model. But when the requirements are undefined, a variant of 'Spiral' can be used to deal with that.
    • When requirements are not defined, the system gets defined while it is being designed. In such cases, you need to keep adequate spaces in respective modules, which later expansions are expected.
  4. Decide what architecture to be used. In my case, to design our Document Management System (DMS), I will be using a combination of ASP.NET MVC and Multitier Architecture (Three Tier Variant).
  5. Analyze the system and identify its modules or sub systems.  
  6. Pick one sub system at a time and further analyze it and identify all granular level requirements belonging to that part of the systems.
  7. Recognize the data entities and define the relationships among entities (Entity Relationship Diagram or ER Diagram). That can followed by identifying the business entities (Some business entities directly map with the classes of your system) and define the business process flow.
  8. Organized your entities. This is where you normalize your database, and decide what OOP concepts and design pattern to be used etc.  
  9. Make your design consistent. Follow the same standards across all modules and layers. This includes streamlining the concepts (as an example, if you have used two different design patterns in two different modules to achieve the same goal, then pick the better approach and use that in both the places), and conventions used in the project.
  10. Tuning the design is the last part of the process. In order to do this, you need to have a meeting with the project team. In that meeting you need to present your design to your team and make them ask questions about it. Take this as an opportunity to honestly evaluate/ adjust your design.