Tag: ASP.NET

ASP.NET : Assembly Build Date On Web Pages

In one of our Projects we needed to display the build date of the Web application on a web page.   There are other ways like using a custom build task to generate this information but we just used a small tweak based on the way Assembly Version information is filled in, to extract the build date and time. 

Just replace the build and revision numbers in AssemblyVersion in AssemblyInfo.cs with ‘*’. So VS will fill in the build date (as number of days from 1/1/2000) and time as seconds elapsed from midnight. Now go and extract date and time from this info.

We always do clean and full builds, so this always reflects the build date/time for all pages.  May not be a perfect solution but it serves our purpose.

Sample Code :

image


ASP.NET Security Vulnerability And A Work-around

Microsoft issued a security Advisory about a vulnerability in ASP.NET :

Microsoft is investigating a new public report of a vulnerability in ASP.NET. An attacker who exploited this vulnerability could view data, such as the View State, which was encrypted by the target server, or read data from files on the target server, such as web.config. This would allow the attacker to tamper with the contents of the data. By sending back the altered contents to an affected server, the attacker could observe the error codes returned by the server. We are not aware of attacks that try to use the reported vulnerabilities or of customer impact at this time.  

Microsoft Security Advisory (2416728)

While the issue is still being investigated, Scott Gu offers a workaround that could help prevent hackers succeed in using the loophole. The work around is to hide specific/detailed error code information to the user and instead display a generic error page.

The blog post also offers a script that you can run on your web sever to identify all applications that need to be patched.  Take a look and patch your applications ASAP.


Trends : ASP.NET MVC Vs Ruby on Rails (RoR)

While discussing about the trend charts of .NET Versions over lunch yesterday, the discussion led to ASP.NET MVC and how does it fare against Ruby On Rails (ROR). Ofcourse, we are just talking about Search Patterns here.  So here is the search Patterns chart between RoR and ASP.NET MVC.

image_thumb14

It is quite a surprising chart though. Try interpreting the chart and let us know your thoughts.


Cowboys To Craftsmen with ASP.NET MVC ??

Quite an interesting way to put the Journey of ASP.NET (developers) from ASP.NET Page based design to MVC based applications. Hope I am not taking it out of context. Its not explicit, but it is written all over the wall. Nevertheless, towers of abstraction and magic by Visual Studio often make developers ignore the inner workings of the framework. Its not a surprise to find an ASP.NET developer that hardly knows anything about HTML beyond the acronym and yet can still develop great ASP.NET pages that really work.

Undoubtedly ASP.NET MVC is better than ASP.NET Web forms, particularly in terms of testability and separation of concerns. But I do not think the model (be it MVC or Web forms) itself could create a better developer somehow.

There are two ways to be a developer. You can be a cowboy or you can be a craftsman. A cowboy jumps right in and starts coding. A cowboy can build a software application quickly. The problem with being a cowboy is that software must be maintained over time.

A craftsman is patient. A craftsman builds software carefully by hand. A craftsman is careful to build unit tests that cover all the code in an application. It takes longer for a craftsman to create an application. However, after the application is created, it is easier to fix bugs in the application and add new features to the application.

Most software developers start their programming careers as cowboys. At some point, however, you must hang up your saddle and start building software that will stand the test of time.

Source : Stephen Walther on ASP.NET MVC

You can see the focus and so much stress on ‘hand crafting’.  I guess even ASP.NET is going through a journey of its own. by moving away from it’s Page based model and embracing MVC that the rest of the world has been using for years.


ASP.NET Vs Ruby On Rails (RoR) : Now You Know ASP.NET MVC

Listen to this wonderful conversation between Scott Hanselman, Martin Fowler and David Heinemeier Hansson happened back in 2007 before we ever heard of ASP.NET MVC. Transcript here.

Scott sits down with Martin Fowler of Thoughtworks and David Heinemeier Hansson of 37 signals and talks about beauty, making developers happen, the death (or life) of HTML, the future of Microsoft, and asks if we should care about Rich Internet Applications. DHH is the creator of the Ruby on Rails framework, and Martin Fowler is the Chief Scientist at ThoughtWorks, well-known systems architect and Extreme Programming expert.

Hansel Minutes 

So delighted to see such a bold and open discussion between passionate developers with completely different backgrounds and ideas.

Some how, this podcast explains a lots of things that were introduced in ASP.NET after 2007. Not suggesting that this has anything to do with that, but probably things must have been already moving in that direction, part of that led to an open discussion like this.

It is totally surprising to see no comments on this podcast. But this is one of the best of conversations out there.


Copyright © 1996-2010 INSPIONS Inc. All rights reserved.
iDream theme by Templates Next | Powered by WordPress