An introduction to System.Web.Portal

By Mohammad Mahdi Ramezanpour at January 22, 2009 23:01
Filed Under: System.Web.Portal

One of my resolutions that I didn’t mentioned in my previous post about “Things I’m going to do in 2009” is to upgrade my portal to ASP.NET 3.5 add some great features to it.

But as a matter of fact, it hadn’t has a name because the portal was not my main goal and I really didn’t have any plan for it till a few weeks ago. Because I’m going to release this version officially, I decided to select a name for it. I researched a lot about a good name and found lots of names! Finally and after lots of researches, I’ve selected System.Web.Portal and think it’s a good name for it.

I’ve seen lots of portals and have worked with most of them such as DotNetNuke, Rainbow, etc. and realized that these portals are only good for those who are a normal user and don’t want to develop anything under these portals. Also these portals have some kind of limitations such as the database limitations and more.

In System.Web.Portal it’ll be easy like a piece of cake to develop modules, controls, providers, etc. and I’m sure you’ll enjoy it.

In the first version of this portal witch will be available in few months, I’m going to use the following technologies:

ASP.NET 3.5 Web Forms

I’m going to use ASP.NET Web Forms in this project and as a matter of fact, I don’t want to move into ASP.NET MVC or any other alternative solutions but a developer with a knowledge of ASP.NET can develop an ASP.NET MVC version because it’ll be so easy to develop under this platform!

LINQ

I think it’s now time to leave some interesting things such as DataSet, DataTable, etc. and move to LINQ because of its ease-of-use. The first version of this portal will have two providers; a provider for Microsoft SQL Server and one for XML and I’m going to use LINQ in order to do so. Besides, the next versions will support some other database engines like Sqlite, VistaDB, FireBird SQL, Oracle and more.

Compatible With Mono

First of all, Lets see what is mono:

Mono is a software platform designed to allow developers to easily create cross platform applications. It is an open source implementation of Microsoft's .Net Framework based on the ECMA standards for C# and the Common Language Runtime. We feel that by embracing a successful, standardized software platform, we can lower the barriers to producing great applications for Linux.

More info: http://www.mono-project.com/What_is_Mono

This portal will be writing in C# 3.0 which is completely supported by Mono. It means you can also run this portal in Linux, Sun Solaris and any other platforms you want!

All you’ll need is to create a provider for your database like MySQL (that of more common in Linux) and then enjoy! You don’t want? The default XML provider is supported in all platforms; so don’t change anything if you’re not going to use any specific database.

There are some other great features in this portal that you’ll see in the first release of this project.

How to permanently delete files from your computer

By Mohammad Mahdi Ramezanpour at January 21, 2009 21:29
Filed Under: Other

Sometimes you want to sale your PC or laptop to another person but there are some important or high-privacy files that you don’t want anyone to access them.

You may format your hard drives but these days formatting a hard drive is not a safe way because of some recovery tools that a person can use and recover all your files!

www.recovermyfiles.com is one of the most famous one that enables you recover all your deleted files.

So what should a person do if wants to permanently delete file that no recovery software can recover?

In this quick post I want to introduce you to a good application name “SDelete” that is a recommendation software from the Microsoft in order to do so.

I really don’t want to explain more because Microsoft already did in the link below. You can find all you need to know about it and also there is a download link for “SDelete”.

Here we go: http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

How to encrypt data using Microsoft SQL Server

By Mohammad Mahdi Ramezanpour at January 19, 2009 17:53
Filed Under: SQL Server

Today I had a problem with Encryption. I wanted to encrypt some data and then compare to the thing that user entered. It’s so easy to do it in .NET environment using System.Security.Cryptography but the problem was, the company had been developed an application using Visual Basic 6 and there was no way to change it.

That company had been developed an encryption algorithm to use in their own products and I didn’t know the structure. I called the old software’s developer and he told me that “I cannot change my structure!”. “The only thing I can do for you is to pass you passwords which users entered”, he said. After lots of challenges, He accepted to add some codes to his application in order to save another password is another database field. So I decided to create a User-Defined Function in order to encrypt my data using MD5 algorithm.

As a matter of fact, I was gotten so far from SQL Server programming since the release of LINQ and after this long time, I got back to the SQL Server T-SQL programming.

In this post, I’m going to tell you how to encrypt data using Microsoft SQL Server.

Encrypting data in SQL Server is much easier than .NET, in my opinion. The HashBytes function will enables you to do so!

Note: HashBytes function is only available in Microsoft SQL Server 2005 and 2008.

Here is the structure:

HashBytes ( <algorithm>, { @input | 'input' } )

And here is the sample:

DECLARE @HashThis nvarchar(4000);
SELECT @HashThis = CONVERT(nvarchar(4000),'dslfdkjLK85kldhnv$n000#knf');
SELECT HashBytes('SHA1', @HashThis);

You can also convert it to HEX. To do this you need to make a use of a UDF in the master database named “fn_varbintohexstr” witch do it for you!

This is one of those functions that look simple but you cannot believe how much time I spent in order find it out :-); because I couldn’t find it even in MSDN!

So the code will change a little:

DECLARE @HashThis nvarchar(4000);
SELECT @HashThis = CONVERT(nvarchar(4000),'dslfdkjLK85kldhnv$n000#knf');
SELECT master.dbo.fn_varbintohexstr(HashBytes('SHA1', @HashThis));

Dark Standard theme for BlogEngine.NET

By Mohammad Mahdi Ramezanpour at January 12, 2009 18:41
Filed Under: BlogEngine.NET

Many of my friends asked about my website’s theme and they wanted me to upload it make it public.
After lots of challenges, I decided to release so I uploaded it to the CodePlex.

Here you can download it; it’s the theme I used in my website. Click Here

Windows 7 is now available on MSDN!

By Mohammad Mahdi Ramezanpour at January 08, 2009 22:05
Filed Under: Microsoft

Windows 7 - Photo taken from http://en.onsoftware.com/wp-content/uploads/2008/05/windows-7-logo.jpg About 2 days ago, Microsoft released Windows 7 beta 1 and it’s now available on MSDN.

I think it’s necessary for Microsoft to release a new version of Windows because in my opinion, current Windows Vista SP1 is good-for-nothing. I’m using Windows Vista SP1 while developing applications and think it’s not good even for development purposes.

I haven’t tried Windows 7 because of some internet problems we have in the country and my internet bandwidth limitations, but I recommend it because Microsoft said, “Over the past few years, you've asked us to make some changes to Windows. We listened closely. Now it's time to share an early look at how we've used your feedback.”

People aren’t satisfied of Windows Vista because of errors it has so Microsoft released Windows Mojave™. You can check out its website to see how people hate Windows Vista.

Microsoft is trying to release a better version of Windows which you can call it Windows because they lost a lot of things on Windows Vista. In my opinion, Windows Vista Project has been lost.

By the way, Windows 7 has some great features that you can checkout at: http://www.microsoft.com/windows/windows-7/whats-new.aspx

Currently Reading

Quote of the day

Send Persian SMS