Pages

Thursday, December 31, 2009

Types of Data Models



This post talks about the different types of data models we create when working with databases. The different data models include:

Conceptual Data Model

In this model, an Entity Relationship Diagram (ERD) is created. This diagram identifies all the entities in the system. In addition to it, it also defines the relationship between these entities.


Logical Data Model

In this model, the data is normalized. Normalization is the process of converting complex data structure into simple one. In this model, data is arranged properly in tables and Primary Keys (identifiers) are identified. Also relationships (based on ERD) is defined amongst tables.


Physical Data Model

In this model, the Logical Model is mapped to the target database technology. The schema is defined which includes the attributes, primary keys, forign keys and relationships.

Hope this helps. Stay tuned for more...

Windows SharePoint Services vs Microsoft Office SharePoint Server


In this post, I will try to explain the difference between Windows Sharepoint Services (WSS) and Microsoft Office Sharepoint Server. People new to Sharepoint tend to use both terms interchangeably. However, these are two different products (although they are inter-related). In the following section, we will see the difference between the two.


Windows Sharepoint Services (WSS)


WSS is a part of Windows Server Technology including Server 2003 and 2008. It has to be installed separately and requires IIS 6.0+ and .NET 3.0 framework. After you have installed WSS, you have access to the following features:

• Sites, Lists
• Blogs, RSS Feeds
• Alerts, Workflows
• Creating Team Sites
• Document Management

The WSS also integrates with other Microsoft Office products including Outlook, Excel etc.


Microsoft Office Sharepoint Server (MOSS)


MOSS is a separate product offered under the Microsoft Office Umbrella. We have to purchase a separate license for this product. In addition to features provided by WSS, MOSS offers the following additional features:

• Business Intelligence
• Business Data Catalog
• Business Data Web Parts
• MySites (customizable personal sites for users)
• Advanced Workflows
• Policies
• Content Authoring

You can download the above two products from the following links:

WSS with SP
MOSS 2007 Trial Version with SP2

Stay tuned for more...

Monday, December 28, 2009

Windows Vista SP2 to the rescue



If you are one of Windows Vista users and have been pulling your hair due to performance issue then you should install Windows Vista SP2 immediately. You can download it from the following link:

Windows Vista SP2

I installed it recently, stopped a few Startup services and have stopped complaining about Vista ever since (Good work Microsoft - a bit late though)

Thursday, December 24, 2009

Running ASP.NET 2.0 under IIS 7.0



In this post, I will share my experience of running ASP.NET 2.0 applications under IIS 7.0. If you run an ASP.NET 2.0 application under IIS 7.0, you will get a 500 – Internal Server Error. This will occur since IIS 7.0 has got a new enhanced architecture.

In earlier versions of IIS (6.0 and below), asp.net applications run under IIS through ISAPI extensions. These extensions have their own processing model and every request must go through this model (or pipeline). In addition to this pipeline, an asp.net application has its own request pipeline (handlers) which processes user requests. This results in two pipelines being exposed. One for ISAPI extensions and other for managed applications.

IIS 7.0 merges the two pipelines into one Integrated Managed Pipeline which handles both native and managed request. This provides added features to the developers. For example, many of .NET features such as Authentication, Authorization can be applied to images, scripts and other files which may come under ISAPI extensions. Similarly, URL Rewriting is powerful feature added to IIS 7.0 to help write SEO URLs.

Due to the above mentioned architecture, asp.net 2.0 applications do not run under IIS 7.0 out of the box. IIS will give a 500 – Internal Server Error when trying to browse the application. The solution to fix this problem is described in the following sections.


Change settings in web.config file

In this solution, we have to change a few settings in the web.config file. This is done by doing the following steps:

• Move entries in <system.web>/<httpModules> to <system.webServer>/<modules>
• Move entries in <system.web>/<httpHandlers> to <system.webServer>/<handlers>

In addition to this, also add the following entry under the <system.web> section:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
</system.webServer>


Change Application Pools setting in IIS

This solution is easier to follow however; this applies to all applications running under IIS and hence prevents from taking advantages of the new IIS features. In this case changes are made in IIS Manager by the following steps:

Start IIS Manager and select ‘Applications Pool’.



In the top right corner, click on ‘Set Application Pool Defaults’. This will display the Application Pool Defaults dialog.



For the ‘Managed Pipeline Mode’ property, select ‘Classic’ and close the dialog.



Now when you browse your asp.net 2.0 application, you must be able to run it successfully. Stay tuned for more.

XCopy and Insufficient Memory Error



Recently I came across an interesting situation pertaining to XCopy so I thought of sharing my experience with you. As part of my daily backup procedure, I use the MS-DOS based XCopy command in a .bat file (scheduled) to copy over a large number of files from one machine to the other. The XCopy command has been working fine ever since until recently I noticed that the entire data was not copied over.

I ran the .bat file manually to see what was going on. After some time, the command window displayed the following message:

Insufficient Memory…

I was using a powerful machine and memory (RAM) was not an issue. After doing some googling, I finally figured out the source of the problem which had nothing to do (at least in my case) with having enough memory. The problem was a long file name which didn’t allow the XCopy command to run to completion. You must be surprised but read on.

The XCopy command fails to handle a fully qualified filename (filename + path) which is greater than 254 characters (which is by the way also the maximum path length allowed by Microsoft OS). The message Insufficient Memory… is very misleading and doesn’t reveal the actual problem.

I went ahead to shorten the name of a few files which fixed the problem. But if this is not the desired solution for you then you can look into using XXCopy (commercial) or Robocopy (free - Microsoft). Although I haven’t used any of these, I have seen some people complaining about XXCopy still not doing the job. Robocopy on the other hand, seem to be a suitable solution. So you can try your luck with that (if you don’t want to shorten the filename :- ).

Stay tuned for more…

Friday, December 18, 2009

IIS 7.0 and HTTP Errors



Recently I have been working with Internet Information Server (IIS) 7.0 and got into a few issues (obviously due to my lack of knowledge :-). I configured an ‘Application’ under the ‘Default Web Site’ but was unable to run it. Adding to it, I only got the following error message which gave no clue of what the problem was:

HTTP Error 500 - Internal Server Error

I unchecked the Show friendly HTTP error messages option in Internet Explorer (you can do so in IE by going to Tools -> Internet Options -> Advanced (tab) -> under Browsing) but to my frustration, this time I got a completely blank screen (no error at all :-). After doing some research, it dawned on me that I had not turned on the HTTP Error feature when I installed IIS 7.0. So I went ahead to install this feature (it is found under Web Server -> Common IIS Features -> HTTP Features -> HTTP Error when installing IIS). With this feature installed, you can see an Error Pages (shown below) icon in IIS Manager.

After turning on the HTTP Error feature, there is one more step needed before you can see the proper error message. In IIS Manager, click on Default Web Site and select the Error Pages feature as shown below:



This will bring you to another screen where you click on Edit Features Settings as shown below:



Next you will see a Edit Error Pages Settings dialog box. Make sure the option Detailed errors for local requests and custom error pages for remote request option is selected as shown below:



Now when I browsed my application, I was delighted to see the error message (had to fix it though :-) as shown below:





Detailed vs. Custom Errors

IIS 7.0 either displays a Custom or a Detailed error message based on the type of request. A ‘Custom Message’ is displayed to a client accessing the website from a remote location. This is a short user-friendly message which doesn’t reveal any information pertaining to the website.

A Detailed error message, on the other hand, is displayed when browsing locally (the same machine). Usually the developer or the admin would need to do that for debugging purpose. This type of error message is more verbose and informative which helps in debugging the application. A detailed message would look like the one shown above.


Hope this was useful. Stay tuned for more...