Saturday, November 3, 2012

Changing TargetFramework of ASP.NET project in VB

I recently faced a situation where we had to run one project on server running .NET 2.0. The project was ASP.NET application using VB.NET.

In C# you easily find the targetframework option in the applications tab of properties dialogbox but in VB.NET i was struggling to find that

Later on I found that you can go to project properties -> Compile -> Advance Compile Options where the target framework option can be found

Tuesday, August 7, 2012

Introduction to Web Applications (MAJU Fall 2012)

Learning Objective:
To introduce Web Applications in simplist terms and to introduce the key players involved

What are web applications?
Simplist definition:Stored on a server and accessed via A Web Browser

Whats the advantage?
- Code resides at a single place
- Clients need no installation therefore there is no need of high processing and memory capabilities at client end
- Incase new feature needs to be coded then update is required at the server only. In other words maintenance is easy

Why Study Web Application?
- Due to easy maintenance companies donot hestiate to chose web based solutions
- Requires less processing power at the client end
- Can be very easily made available over the internet so that remote users can also use the application

Entities Involved
- Web Browser
- Web Server
- Database Server (optional)

Web Browser: Has the responsibility of displaying the output to the end user

Web Server:
Has the responsibility of processing the request of user and preparinng the response

Database Server:Stores the data that is important to users

To understand the role of each lets take example of restaurant and compare it with Web Applications:
-You give your order to the waiter
-In web application you place request on web browser
-The waiter takes the order to the cook
-The browser sends the request to server
-The cook reads the order and prepares dishes
-The webserver reads the request and prepares response
- To prepare the dishes the cook obtains ingrediants from the server
- To prepare the response server obtains data from Database Server
- The cook gives the prepared dishes to the waiter
- The Server sends the prepared response to the browser
- The Waiter brings the dishes to you
- The browser displays the prepared response to you

Communication Between Browser and Server- The scenario of Browser and Server is more complex than that of Waiter and Cook. Both Waiter and Cook belong to the same restaurant, but browser and server and normally made by different companies
- If browser of each company applies a different set of rules to ensure successfull transit of data to server then developing a server will become a very complex task as server will have to have knowledge of varying rules of each browser
- Similary if server made by each company applies different set of rules to send respone then making browsers will become very difficult
- The solution is to have a standard set of rules that all browsers and servers use. This standard set of rules is known as Hyper text Transfer protocol
- Similary the contents of the response contain a standard language which Hyper text markup language

Friday, February 24, 2012

Mapping ER Models into Relations (For Students of Database Systems)

I was about to write something on this topic but found a resource that contains the contents I was willing to discuss.
Do visit the link below and get the copy of material for future reference
http://db.grussell.org/section006.html

Friday, January 6, 2012

Database Systems Lecture 1 & 2 (MAJU Spring 2012)

Topics of the Lesson:
• Introduction of Database
• File-based systems
• Database management systems
• Comparison between File-based system and Database management systems

Functions of DBMS
Introducing Database:
The simplest definition is given by Date (1999, p. 2) according to which Database is a
collection of computerized data files. In simple words it is computerized
record keeping.

Examples of Database Applications
• Purchases from the supermarket
• Purchases using your credit card
• Booking a holiday at the travel agents
• Using the local library
• Taking out insurance
• Using the Internet
• Studying at university

File-based Systems
• Collection of application programs that perform services for the end users (e.g. reports).
• Each program defines and manages its own data
• E.g. is a C++ system that accepts and stores data. In such case the sequence in which the fields are recorded is coded in the program, not in the file.

Limitations of File-Based Approach

• Separation and isolation of data
– Each program maintains its own set of data.
– Users of one program may be unaware of potentially useful data held by other programs.
– Duplication of data
– Same data is held by different programs.
– Wasted space and potentially different values and/or different formats for the same item.

• Duplication of data
– Same data is held by different programs.
– Wasted space and potentially different values and/or different formats for the same item.

Database Approach

• Arose because:
– Definition of data was embedded in application programs, rather than being stored separately and independently.
– No control over access and manipulation of data beyond that imposed by application programs.

Result:
– the database and Database Management System (DBMS).

Formal definition of Database
• Shared collection of logically related data (and a description of this data), designed to meet the information needs of an organization.
• System catalog (metadata) provides description of data to enable program–data independence.
• Logically related data comprises entities, attributes, and relationships of an organization’s
information.

Database Management System (DBMS)
• A software system that enables users to define, create, and maintain the database and that provides controlled access to this database.
Views
• Allows each user to have his or her own view of the database.
• A view is essentially some subset of the database.

Functions of Database Management System
· Provide Security
· Data Integrity
· Provide controlled concurrency
· Reduced data redundancy
· Crash Recovery
· Backup and Recovery

Friday, August 12, 2011

Introduction to WIX (Windows Installer XML)

Recently I have got an opportunity to work on creating installers for some of our products. In past I never got involved in post development activities but during my current job I spent some time in development related to deployment.
I have discovered there is a whole world out there to explore. Even the tip of the ice berg is quite vast.
Initially I created installers based on MSI technology using Visual Studio. However, I experienced that the approach was not friendly when it come to incorporate some product changes in installer. This is because we need to recompile the entire project and subsequently do some changes to resultant installer via orca. Addition/updation is a very common requirement in the web-based products we sell. For example, sometimes there is a small change like css update of an image/icon changes. This approach, which I was using required someone to rebuild the Visual Studio project which implies that visual studio is present on the machine. In addition, another dependency exists in the form of a person who knows visual studio and has some experience of creating installers.
Eventually a need of such an approach was felt which could free us from such dependencies.
The research resulted in the discovery of Microsoft WIX (Windows Installer Xml). WIX which is based on MSI technology allows us to descriptively create installers using XML files. There are tools through which people only specify the folders that need to be part of the installer and facilities are available to almost do whatever that is necessary while creating installer. Plug-ins are also available to integrate WIX with visual studio.
However, it must be kept in mind that the learning curve is quite steep. To facilitate people who are interested in learning WIX, I am listing some of the resources that I found useful. I will be adding some more resources to the list after filtering the collection I have

Creating WIX Installer for ASP.NET Web Application
http://www.codeproject.com/KB/install/asp_wix.aspx

From MSI to WiX
http://blogs.technet.com/b/alexshev/archive/2008/02/10/from-msi-to-wix.aspx

WIX Tutorial
http://wix.tramontana.co.hu/tutorial

Logging in IIS 7

Location of Log file:
%SystemDrive%\inetpub\logs\LogFiles

Pre-Requisite of Logging:
On Windows Server 2008 R2, following role service must be installed (In other Windows OS the following module must be enabled)
• Http Logging

Enabling and Disabling Logging:

If the pre requisite is installed the “Logging Icon” will appear in the “IIS” category of IIS Manager ([Server] Home Screen)
By default it is enabled, however it can be disabled or other configuration can be changed

References:
http://www.itsolutionskb.com/2009/10/how-to-find-iis-log-files/
http://technet.microsoft.com/en-us/library/cc754631(WS.10).aspx

Monday, August 1, 2011

AnjLab Profiler and “master.mdf…trc” files

SQL Profiler is a very useful tool to trace the execution of instructions over a database, however , it is not available for express edition of SQL Server databases
An alternate for this is a profiler from AnjLab which provides features quite similar to that of SQL Profiler.
Both SQL Profiler and AnjLab Profiler make use of the “Trace” facility available in the database engine of SQL Server.

Overall this profiler is harmless, however, there are two issues that must be considered when using the profiler

1. The profiler creates “master.mdf..yyyy.mm.dd.hh.min.sec.trc” file but (at least in our case it) does not delete the file when tracing is finished. These files are created in the default “DATA” folder of SQL Server instance (in our case). Since the files are not deleted automatically therefore a number of trace executions consume a lot of valuable space

2. In our scenario, if the profiler executes for a long time then it starts going into “Not Responding” states. Eventually the user is forced to close the application. In this case the “Trace” in SQL Server is not deleted thus it continues to execute and keeps on creating files unless explicitly closed using “sp_trace_setstatus”. (For more information on finding, stopping and closing traces see the article in this blog “SQL Server Trace Files Consuming Lot of Space”).