Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1/97)
___________________________________________________________________________
√ TIDAK TERHAD
Disahkan oleh
____________________________________ ____________________________________
(TANDATANGAN PENULIS) (TANDATANGAN PENYELIA)
Alamat Tetap:
68-5-5, PANGSAPURI MESRA,
____________________________
JLN. LIM KHOON HUAT,
____________________________ PM. DR. SULAIMAN BIN MOHD NOR
___________________________________________
10460, GEORGETOWN, P. PINANG.
____________________________ Nama Penyelia
MAY, 2009
ii
I declare that this thesis entitled Client Initiated Network Internet Speed Test
Monitoring System (CINISTMS) is the result of my own research except as cited in
the references. The thesis has not been accepted for any degree and is not
concurrently submitted in candidature of any other degree.
Signature : ....................................................
I certify that i have read this project report, and in my opinion, it is fully adequate, in
scope and quality, as dissertation for the degree of Bachelor of Computer
Engineering.
Signature : ....................................................
ACKNOWLEDGEMENT
To my brother Ahmad Haidir Bin Ahmad Najib Kamil, I would like to thank
you for every guide you had gave to me and the truth is your guidance is invaluable.
My deep appreciation also goes to Hamidah Binti Hassan for supporting me from
behind while completing this project.
Last but not least, my true love and deepest thanks goes to my family for
always supporting me and loving me without boundaries.
v
ABSTRACT
ABSTRAK
TABLE OF CONTENTS
PAGE
TITLE PAGE i
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF FIGURES xi
CHAPTER 1 : INTRODUCTION
1.0 Introduction 1
1.1 Problem Background 1
1.4.3 Database 6
1.4.4 Communication Protocol 7
1.4.5 Core Programming Language 7
1.5 Overview on the Next Chapters 8
2.10.1 XML 24
2.10.2 SOAP 25
2.10.3 UDDI 25
2.11 HTTPWebRequest and HTTPWebResponse 26
ix
CHAPTER 3 : METHODOLOGY
3.0 Introduction 28
3.1 Elaboration Phase 30
3.1.1 Client Side Elaboration Phase 30
3.1.2 Server Side Elaboration Phase 31
3.2 Design Phase 33
3.2.1 Client Side Design Phase 33
REFERENCES 71
APPENDICES 73
xi
LIST OF FIGURES
FIGURES PAGE
1.1 Wi-Fi UTM Network Topology 2
1.2 CINISTMS Objective 5
LIST OF TABLES
TABLES PAGE
2.1 Three Categories of Port Numbers 19
2.2 IIS7 Modules 21
LIST OF ABBREVIATIONS
LIST OF APPENDICES
APPENDICES PAGE
A CINISTMS WINDOWS APPLICATION SOURCE CODE 73
B CINISTMS DATABASE WEBPAGE SOURCE CODE 84
1
CHAPTER 1
INTRODUCTION
1.0 Introduction
This project was developed to monitor the download rate speed tested by clients
in UTM’s network to any URL. Beside wired at certain location, the internet connection
provided at colleges in UTM is wireless and the service was known as Wi-Fi UTM. The
purpose of this project is to produce software that can be used by UTM’s student to test
their download rate speed to reach any URL while using the internet services.
Since CICT provides Wi-Fi UTM service at all colleges in UTM, clients that
used this service increased rapidly. One of the main reason why the usage increased is
due to the service itself which is free of charge. After about two years this service has
been provided, clients that used this service which is UTM’s student itself complained
2
that the download rate speed is quite slow to reach the URL that their requested.
However, clients does not know how much or how slow the download rate speed for
them to reach the requested URL. Figure 1.1 below shows the network topology in
UTM.
Central
Server
Firewall
KTC
Firewall
KTDI
Access Point
Access Point
From the problem mentioned in section 1.1, the specification of this project must
be determined in order to make the development process goes swiftly as it can be. The
main purpose of this software is to build software that will allow the client to do a test
on their download rate speed to reach any URL while using the Wi-Fi UTM. After the
test has been executed, the data obtained from the client which are the host’s IP address,
size downloaded from the URL, duration to reach the URL, tested URL, average speed
to reach the URL and date and time of the particular test will be sent to the database
through a webpage that used web services technology.
The client initiated model is used due to the existence of firewall between the
central server and client. Thus, the server cannot fully monitor all its client activities
since the firewall will protect all transaction initiated from the server. Therefore, to
overcome this problem the client initiated model is used to initiate the logical connection
between the client and the server.
1.3 Objective
Defining the objective for this project is very crucial as it will determine the
success of this project. It is important to set a goal before doing something without a
purpose or out of purpose. Hence, the objective of doing this project is to develop
software that will monitor the download rate speed tested on any URL from all clients in
UTM’s college and to show the result through webpage.
4
CINISTMS will have two major components which is the client and the server.
From the client perspective, it will do a test on the download rate speed from both
intranet and internet. Example of intranet link is www.utm.my whereby www.google.com
as an internet link example. The result obtained from the client will be sent to the server
which is a webpage as the monitoring purposes and the client will be implemented on
Microsoft Windows operating system. The data that will be obtained from the client are
the host’s IP address, size downloaded from the URL, duration to reach the URL, tested
URL, average speed to reach the URL and date and time of the particular test.
From the server perspective, a webpage called CINISTMS Database will provide
a service whereby it will store all the data sent by clients which is the service requestor.
Besides providing those services, the webpage will display all the data inside database as
well as for the monitoring purposes. Figure 1.2 shows the architecture of CINISTMS.
5
Test on
download rate
Firewall
speed and
send the result
to server.
Client (MS Windows)
The work scope will set certain limitations and boundaries for this project. By
doing so, this project can be done without going out of scope. Some of the limitations
are discussed on the following sub section.
6
For this project, both client and server will be implemented on Microsoft
Windows operating system since the majority of students in UTM used Microsoft
Windows operating system in their laptops or desktops.
1.4.2 IDE
Microsoft Visual Studio 2008 has been chosen as the IDE for this project and all
coding process will be done within this tool. This tool was developed by Microsoft and
the express edition is freely available on the Microsoft official website.
1.4.3 Database
As for storage elements, Microsoft SQL Server 2005 Express Edition has been
used to store the data of tested download rate speed from clients at the server side. This
software is available along with the purchase of Microsoft Visual Studio 2008 IDE.
7
The core programming language for this project is C# and there are some
advantages of using this programming language. C# is a modernized version of C++ and
C# has simplified the syntax by removing some of the complex features of C++. For
example, C# does away with the pointers because direct memory manipulation is not
allowed in C#.
8
In chapter two, the literature review of this project will be presented whereby all
the concepts and theories used to accomplish this project will be stated clearly such as
the concepts of computer network, client-server model and the Microsoft .NET
framework.
In chapter four, the results and discussions of this project will be documented to
shows the achievement of this project on its actual deployment and the discussions based
on the results obtained. Besides that, this chapter will also discuss on the problems
encountered with the solutions and the limitations of this project.
The last chapter will conclude this project and come out with a list of
recommendations for future development of this project.
9
CHAPTER 2
LITERATURE REVIEW
2.0 Introduction
In this chapter, all the theory and concept in making this project come true will
be discussed starting with the definition of a computer network, TCP/IP protocol suite,
IIS7, Microsoft .NET framework, web services and etc.
A computer network can be classified into two networks which LAN and WAN.
The following section will discuss about the LAN and WAN network in details.
2.2.1 LAN
2.2.2 WAN
From Zacker (2001), a WAN is a collection of LANs, some or all of which are
connected using point-to-point links that span relatively long distances. A typical WAN
connection consists of two routers, one at each LAN site, connected using a long-
distance link such as a leased telephone line. Any computer on one of the LANs can
communicate with the other LAN by directing its traffic to the local router, which relays
it over the WAN link to the other site. Figure 2.2 shows the WAN network diagram.
12
LAN LAN
Copper/
Wireless/
Fiber Optic
From Stevens (1999), TCP/IP protocol suite allows computers of all sizes, from
many different computer vendors, running totally different operating systems, to
communicate with each other. Normally, TCP/IP can be considered as four layers
system as shown on figure 2.3.
13
From figure 2.3, it is obvious that each layer has its own task. The next section
will discuss about each layer responsibilities in details.
The link layer, sometimes called the data-link layer or network interface layer,
normally includes the device driver in the operating system and the corresponding
network interface card in the computer. Together they handle all the hardware details
physically interfacing with the cable or whatever type of media is being used.
14
The network layer handles the movement of the packets around the network. IP,
ICMP and IGMP provide the network layer in the TCP/IP protocol suite.
The transport layer will provide a flow of data between to hosts. There are two
common transport protocol used in the TCP/IP protocol suite which is TCP and UDP.
TCP transport protocol will acknowledge all the packets sent to the server back
to the client. In other words, the client can have the guarantee that all the packets sent to
the server is successfully sent.
On the other hand, UDP transport protocol did not have any guarantee to the
client that the packets sent is successfully received by the server.
The application layer will handle s the details of the particular application such
as FTP, SMTP and SNMP.
15
From Stevens (1999), most networking applications are written assuming one
side is the client and the other the server. The purpose of the application is for the server
to provide some defined service for clients. Therefore, the server can be categorized into
two classes which are iterative or concurrent.
16
Iterative server only capable of handling one client for each session and the
problem with an iterative server is when the server processes the client request whereby
no other clients are serviced during that time. Figure 2.4 below shows the iterative server
steps.
Concurrent server has the ability to handle multiple clients in concurrent period
whereby it will start a new server to handle new client’s request. Thus, this is the main
advantages of concurrent server over the iterative server. Figure 2.5 below shows
concurrent server steps.
TCP and UDP identify applications using 16-bit port numbers. Servers usually
known by their well-known port numbers such as FTP server provides that service on
TCP port 21. Those services that can be provided by any implementation of TCP/IP
have well-known port numbers between 1 and 1023. The well-known ports are managed
by IANA.
A client usually does not care what port number it uses on its end. All it needs to
be certain is whatever port number it uses is unique on its host.
2.6.1 Ranges
Table 2.1 below shows the range of well known port numbers.
Sometimes ports may be used for different applications or protocols that their
official IANA designation.
19
From Khosravi (2008), IIS7 is the latest version of Microsoft web server. IIS7
has gone through significant architectural changes since the last version. The most
notable change for ASP.NET developers is the deep integration of the IIS7 and
ASP.NET framework. This provides both ASP.NET developers and IIS7 administrators
with an integrated programming environment that allows them to implement features
and functionalities that were not possible before.
IIS7 was released along with Windows Vista and features a modular architecture.
Instead of a monolithic server which features all services, IIS7 has a core web server
engine. Modules offering specific functionality can be added to the engine to enable its
features. The advantage of having this architecture is that only the features required can
be enabled and that the functionalities can be extended by using custom modules.
IIS7 will ship with a handful of modules, but Microsoft will make other modules
available online. Table 2.2 shows IIS7 modules.
20
Writing extensions to IIS7 using ISAPI has been deprecated in favor of the
module API, which allows modules to be plugged in anywhere within the request
processing pipeline. Much of IIS's own functionality is built on this API, and as such,
developers will have much more control over a request process than was possible in
prior versions. Modules can be written using C++, or using the HTTP module interface
from a .NET framework language. Modules can be loaded globally where the services
provided by the module can affect all sites, or loaded on a per-site basis. IIS7 has an
integrated mode application pool where .NET modules are loaded into the pipeline using
the module API, rather than ISAPI. As a result ASP.NET code can be used with all
requests to the server. For applications requiring strict IIS6 compatibility, the classic
application pool mode loads ASP.NET as an ISAPI.
A significant change from previous versions of IIS is that all web server
configuration information is stored solely in XML configuration files, instead of in the
metabase. The server has a global configuration file that provides defaults, and each
virtual web's document root may contain a web.config containing settings that augment
or override the defaults. Changes to these files take effect immediately. This marks a
significant departure from previous versions whereby web interfaces, or machine
administrator access, were required to change simple settings such as default document,
21
From H.M. Deitel et, al. (2004), the Microsoft .NET framework is at the heart of
the .NET strategy. This framework executes applications and web services, contains a
class library (called FCL) and provides many other programming capabilities used to
build .NET applications. Table 2.3 shows the Microsoft .NET framework.
ASP.NET is not just another upgrade or the next version of ASP. It is a unified
web development platform that provides necessary services for developers to build
enterprise web based applications. ASP.NET allows you to use a full featured
programming language such as C# or VB.NET to build web applications easily.
Essentially ASP.NET code comprises of compiled code unlike traditional ASP code
which is interpreted thus making it more efficient in terms of execution speed. OOPS
features in ASP.NET. This helps in easy maintainability and reusability of code. As
mentioned earlier, ASP.NET seamlessly integrates different programming languages
without any fear of compatibility issues for these different languages. The whole idea is
to keep the code separate from its implementation. That is the basic idea behind
Microsoft .NET (http://www.asp101.com/articles/nakul/intronet/default.asp).
From H.M. Deitel et, al. (2004), web services encompass a set of related
standards that can be enable two computer applications to communicate and exchange
data over the internet. The data is passed back and forth using standard protocols such as
HTTP, the same protocol used to transfer ordinary webpage.
Web services operate using open, text-based standards that enable components
written in different languages and on different platforms to communicate. They are
ready-to-use pieces of software on the internet. XML, SOAP, WSDL and UDDI are the
standards on which web services rely. XML is used to create mark up languages and
describe data. XML allows groups of standardize data mark up and formatting. SOAP
23
2.10.1 XML
From H.M. Deitel et, al. (2004), the W3C XML Working Group developed
XML, which is derived from SGML, in 1996. XML is widely supported open
technology for electronic data exchange and storage. XML is actually a language used to
create other mark up languages to describe data in structured manner.
24
2.10.2 SOAP
From H.M. Deitel et, al. (2004), SOAP is an XML-based protocol that allows
applications to communicate easily over the internet using XML documents call SOAP
messages.
2.10.3 UDDI
the services you need, read about the service offered and contact someone for more
information. You can, of course, offer a web service without registering it in UDDI, just
as you can open a business in your basement and rely on word-of-mouth advertising but
if you want to reach a significant market, you need UDDI so your customers can find
you (http://www.asp101.com/articles/nakul/intronet/default.asp).
From MSDN, the .NET framework provides comprehensive support for the
HTTP protocol, which makes up the majority of all internet traffic, with the
HTTPWebRequest and HTTPWebResponse classes. These classes, derived from
WebRequest and WebResponse, are returned by default whenever the static method
WebRequest.Create encounters a URL beginning with http or https. In most cases, the
WebRequest and WebResponse classes provide all that is necessary to make the request,
but if the developer need access to the HTTP-specific features exposed as properties,
they can typecast these classes to HTTPWebRequest or HTTPWebResponse.
HTTPWebRequest is the default class used by WebRequest and does not need to
be registered before you can pass a URL to the WebRequest.Create method.
26
The developer can make their application follow HTTP redirects automatically
by setting the AllowAutoRedirect property to true (the default). The application will
redirect requests, and the ResponseURL property of HTTPWebResponse will contain the
actual web resource that responded to the request. If the developer set
AllowAutoRedirect to false, their application must be able to handle redirects as HTTP
protocol errors.
CHAPTER 3
METHODOLOGY
3.0 Introduction
From figure 3.1, it is very crucial to follow those steps stated above because it
will determine the success of this project. Hence, the next section will describe in details
for each phases of this project.
30
Elaboration phase is the most important phase in this project because it will
determine the projection for the whole project. In other words, this phase acts as the
foundation for the whole project phase.
First of all, the project requirement must be defined clearly to make the job goes
swiftly as it could be. For this project, the requirement needed consist of two parts which
is the client and the server.
From the client perspective, a test on download rate speed to reach intranet URL
or internet URL can be done. To make the test fully run on the client side, Windows
application has been chosen to do the task. After the task has been executed, the data
will be sent to the server webpage to store the data inside the database. The data consist
of the host’s IP address, size downloaded from the URL, duration to reach the URL,
tested URL, average speed to reach the URL and date and time of the particular test.
Figure 3.2 shows the client perspective diagram.
31
From the server’s perspective, a webpage which is the server will provide a
service to the service requestor. The service requestor in this project is the client
Windows application whereby it will request the server’s webpage service to store all
the data inside database and this can be done by using SOAP protocol that we had
discussed earlier in literature review part. Besides that, this webpage also will display all
the data inside the database for the monitoring purposes. Figure 3.3 shows the server
perspective diagram.
32
After the project requirement has been defined clearly, now we are ready to
proceed to the next phase which is the design phase.
33
In design phase, all the concepts used to make this project come true will be
defined here. The design phase will be discussed for each part which is the client part
and the server part.
This section will dealing with on how to design the Windows application to meet
the specification discussed on the elaboration phase. The next section will describe in
details all the concepts used in designing the Windows application.
3.2.1.2 SOAP
SOAP protocol will enable the client’s Windows application to send data to the
server webpage which is the service provider.
Web services will be used on the Windows application at the client side whereby
it will grant the Windows application to request the service provided by the server’s
webpage which is to store the data after the test has been executed into database. A
service reference has to be added within the XML configuration file on the Windows
application to use this web services technology.
This section will deal with how to design the webpage on the server side to meet
the specification discussed on the elaboration phase. The next section will describe in
details all the concepts used in designing the webpage.
35
3.2.2.1 HTML
HTML was used as the language to create the GUI for the server’s webpage
within the Microsoft Visual Studio 2008 IDE.
SQL command was implemented on the server’s webpage to store the data sent
by the client’s Windows application into the database and display back all the data
stored inside database through the server’s webpage.
Web services technology has been used to provide a service to the client’s
Windows application to store the data inside database. A WebMethod has to be specified
inside the server’s webpage to provide the service to store the data sent by the client’s
Windows application inside database. Figure 3.4 shows the complete layout of
CINISTMS design.
36
After the design phase has been carried out, it is time to start implementing the
entire design layout for the CINISTMS. The development of CINISTMS consists of
three parts which is the CINISTMS Windows application, CINISTMS Database
webpage and database. To make things easier, the development of each part will be
discussed separately.
37
The development of the client’s Windows application was built using Microsoft
Visual Studio 2008 IDE. Figure 3.5 below shows the GUI of Microsoft Visual Studio
2008 IDE.
To create a new Windows application project, simply click File > New > Project
and a new project menu will appear as shown on figure 3.6.
38
As seen on figure 3.6, the project types for CINISTMS are visual C# and the
templates are Windows forms application. On the name text box, write down
CINISTMS as the project name and specify the location of project within the computer
hard disk and then click the button labeled Ok to pop up a workspace for CINISTMS
Windows application as shown on figure 3.7.
39
After the test has been executed, tested data must be sent into the database for
monitoring purposes. To do so, a service reference must be defined inside the
CINISTMS Windows application XML configuration file to enable it to access the
service provided by the server’s webpage which is CINISTMS Database. Before adding
the service reference, CINISTMS Database website project must be included inside the
CINISTMS Windows application solution explorer. To include CINISTMS Database
website project, right click on solution CINISTMS panel and choose Add > Existing
Website to pop out add existing website menu. After the add existing website menu had
appear, choose the webpage to use as the service provider on local IIS panel and for this
project CINISTMS Database webpage has been chosen. Figure 3.8 shows the solution
explorer after CINISTMS Database website project has been included.
41
After CINISTMS Database website project has been included, the service
reference may be added inside the CINISTMS Windows application XML configuration
file by simply right click on the reference panel on the solution explorer and choose add
service reference option to pop out add service reference menu. Click button Discover to
list down the service provided by CINISTMS Database webpage and rename the
namespace into SpeedTestServiceReference or any names that is suitable. To finish with
the add service reference setup, click button labeled Ok to add service reference inside
the CINISTMS Windows application XML configuration file. Figure 3.9 shows the add
service reference menu.
42
CINISTMS Database webpage was build within the Microsoft Visual Studio
2008 IDE as well and the web server used is IIS7 which is pre-installed in Windows
Vista. Firstly, the configuration of IIS7 through IIS manager will be discussed before
proceeding with the development of the CINISTMS Database webpage.
To open IIS manager menu, write down inetmgr on search text box inside the
start menu and the IIS manager menu will pop up. Figure 3.10 below shows the IIS
manager menu.
From figure 3.10, an explorer is located on the left of the IIS manager menu. To
create a webpage that used IIS7 as web server, click sites panel to pop up the default
website panel. At the default website panel, right click on it and choose add virtual
directory option and add virtual directory menu will popup as shown on figure 3.11
below.
Add virtual directory menu will allow the developer to specify the physical path
of the website project and this physical path could be any place in the computer hard
disk and the alias could be any names that is suitable. For example, D://Projects will be
used as the physical path and the alias will be named as WebSite. As the result, WebSite
virtual directory has been added under the default website panel and the new website
project that used IIS7 as the web server may be easily created using the Microsoft Visual
Studio 2008 IDE.
45
After the configuration of IIS7 through IIS manager has been done, the
development of CINISTMS Database webpage may be started. To create a new website
project using the Microsoft Visual Studio 2008 IDE, simply click File > New > Website
and new website menu will pop up as shown on figure 3.12 below.
From figure 3.12, WebSite alias has been used so the new website project will be
used IIS7 as the web server and shall be rename as http://localhost/WebSite/CINISTMS
Database on the location text box. Click button labeled Ok to proceed to CINISTMS
Database webpage workspace. Figure 3.13 shows the CINISTMS Database webpage
workspace.
46
From figure 3.13, the GUI for CINISTMS Database webpage can be done by
double clicks on Default.aspx panel on the solution explorer and a space for HTML
coding will appear. This HTML space can be used to type HTML command to create the
GUI for CINISTMS Database webpage. To write a source code that runs behind the
Default.aspx, double click on the Default.aspx.cs panel and the space for coding will
appear.
SpeedTestLog.cs. The source code for Default.aspx.cs and SpeedTestLog.cs class will be
attached in the appendix section and the GUI for CINISTMS Database webpage will be
shown on the next chapter which is the results and discussions of this project.
Database is one of the most crucial parts in CINISTMS whereby it will act as the
storage element for all the data sent by CINISTMS Windows application through the
CINISTMS Database webpage using the web services technology.
From figure 3.14, click the button labeled Connect to connect to the database
after write down the login password and the database interface menu will pop up and
this is where the creation of new database shall be done. Figure 3.15 below shows the
database interface menu.
As seen on figure 3.15, a new database can be created by right click on the
database panel located at the object explorer which on the left of the database interface
menu and choose new database option. Within seconds, a new database menu will pop
up and specify the database name. As for this project, the database name will be known
as InternetSpeedTest. After the new database has been created, expand the database
panel and the system database along with InternetSpeedTest panel will be appear.
Hence, expand the InternetSpeedTest panel and a list of panel will be appear and from
that list choose the tables panel and right click on it and choose on new table option to
50
create a new table and rename it as SpeedTestLog. Figure 3.16 below shows the
SpeedTestLog table inside the InternetSpeedTest Database.
SpeedTestLog table is a table whereby all the data sent from clients through the
CINISTMS Database webpage will be stored and SpeedTestLog table are located inside
the InternetSpeedTest database. As seen on figure 3.16, the table consists of seven
colums which are the Id, IpAddr, Size, Duration, TargetedUrl, AverageSpeed and
TestedDate and all the data inside the table was sent by the client. Table 3.1 on the next
page shows the table of the SpeedTestLog.
51
CINISTMS Database webpage will push and pull the data for SpeedTestLog
table whereby the SQL command that will do the write and read process of the data
contains inside the SpeedTestLog.cs which is located inside CINISTMS Database
website project. To make the SpeedTestLog.cs are able to do the write and read process
of the data, a connection string has been declared within the web.config of CINISTMS
Database webpage.
The read process will enable CINISTMS Database webpage to display all the
data inside SpeedTestLog table through the webpage as for the monitoring purposes
while the write process will enable CINISTMS Database webpage to push the data sent
by clients into the SpeedTestLog table which is inside the InternetSpeedTest database.
As for now, the development phase of CINISTMS has been completed and
CINISTMS are ready to proceed with the next phase of the project phases which is the
testing and implementation phase.
52
Testing and implementation phase was the final phase for this project whereby
beta testing on CINISTMS was done within this phase. The accuracy and successful of
CINISTMS can be measure here as the testing begins and any bug that occur can be
identified to fixed it. Thus, this phase is the most crucial phase and it will decide
whether what has been during the previous phases is correctly done or not.
The result for this phase will be presented on the next chapter which is the results
and discussion for this project. The next chapter will discuss about the overall
achievement of this project, problems encountered and the limitations of CINISTMS.
53
Data flow occurs during the process of executing CINISTMS. Thus, this section
will explained in details how the movement of data in CINISTMS. Figure 3.17 below
shows the CINISTMS data flow path.
Store data
Server’s
Webpage received on
server’s webpage
inside the
database.
Send processed
data on Client’s Pull the data
Windows inside database an
application to the show it through
server’s webpage. webpage.
Client’s Windows Server’s
Application Database
Client’s Windows
application do a
request on any
URL.
Client’s Windows
application
Internet
download the
Cloud
webpage content
in bytes.
3.5.1 Data Flow Between Client’s Windows Application and Internet Cloud
The data processed inside client’s Windows application consist of the host’s IP
address, size downloaded from the URL, duration to reach the URL, tested URL,
average speed to reach the URL and date and time of the particular test. This prepared
data is ready to transport to the server’s webpage by using the web services technology.
3.5.2 Data Flow Between Client’s Windows Application and Server’s Webpage
As seen on figure 3.17, client’s Windows application will sent the prepared data
which consist of the host’s IP address, size downloaded from the URL, duration to reach
the URL, tested URL, average speed to reach the URL and date and time of the
particular test to the server’s webpage.
55
As seen on figure 3.17, the data will flow from two directions which are from the
server’s webpage to the server’s database and vice versa. As for the direction from the
server’s webpage to the server’s database, server’s webpage will store the data received
from the client’s Windows application inside database. The data stored inside database
consist of host’s IP address, size downloaded from the URL, duration to reach the URL,
tested URL, average speed to reach the URL and date and time of the particular test.
As for monitoring purposes, server’s webpage will pull all the data inside
database and show it through the webpage and thus make it easier for the user or
network administrator to view it.
56
CHAPTER 4
4.0 Introduction
This chapter will discuss about the achievement of CINISTMS which is the
results obtained, problem encountered with the solutions and the limitations of
CINISTMS.
From the client perspective, the objective is it will do a test on the download rate
speed from both intranet and internet. Example of intranet link is www.utm.my whereby
www.google.com as an internet link example. The result obtained from the client will be
sent to the server which is a webpage as the monitoring purposes and the client will be
implemented on Microsoft Windows operating system. The data obtained from the client
are the host’s IP address, size downloaded from the URL, duration to reach the URL,
tested URL, average speed to reach the URL and date and time of the particular test.
From the server perspective, a webpage called CINISTMS Database will provide
a service whereby it will store all the data sent by clients which is the service requestor.
Besides providing those services, the webpage will display all the data inside database as
well as for the monitoring purposes.
The achievement of CINISTMS will be presented in two parts which is the client
part and the server part. CINISTMS Windows application will be the representative for
the client part while CINISTMS Database webpage will be the representative for the
server part.
are the host’s IP address, size downloaded from the URL, duration to reach the URL,
tested URL, average speed to reach the URL and date and time of the particular test to
the CINISTMS Database webpage which is the server to store the data inside database.
Figure 4.1 below shows the GUI of CINISTMS Windows application.
From figure 4.1, user can easily run a test on any URL by writing down any
desired URL to test within the URL text box located right to the URL label. After that,
the user can simply click the button labeled Run to execute the test. After a while, the
host’s IP address, size downloaded from the URL, duration to reach the URL and the
average speed to reach the URL will appear.
60
After the test has been executed, CINISTMS Windows application will
automatically send the data to the server’s webpage to store it inside database since a
service reference has been declared within CINISTMS Windows application XML
configuration file to request the service provided by the server’s webpage.
The URL must be tested from both intranet link and internet link which is
www.utm.my and www.google.com respectively. The next section shows the results from
both intranet link test and internet link test.
For intranet link test, www.utm.my has been chosen as the variable and figure 4.2
shows the results of intranet link test.
61
As seen on figure 4.2, the results shows that the average speed to reach
www.utm.my is 158.22 KB/s and the duration to reach it is 0.14 seconds. The size
downloaded from www.utm.my is 22682 bytes and the host’s IP address is
10.60.102.145. The content field from figure 4.2 shows the HTML code of www.utm.my.
The test results which are the host’s IP address, size downloaded from www.utm.my,
duration to reach www.utm.my and the average speed to reach www.utm.my will be sent
into database through the server’s webpage by using web services technology.
62
For internet link test, www.google.com has been chosen as the variable and figure
4.3 below shows the results of internet link test.
As seen on figure 4.3, the results shows that the average speed to reach
www.google.com is 4.74 KB/s and the duration to reach it is 1.09 seconds. The size
downloaded from www.google.com is 5290 bytes and the host’s IP address is
10.60.102.145. The content field from figure 4.2 shows the HTML code of
63
www.google.com. The test results which are the host’s IP address, size downloaded from
www.google.com, duration to reach www.google.com and the average speed to reach
www.google.com will be sent into database through the server’s webpage by using web
services technology.
On the server part, CINISTMS Database webpage was successfully done to carry
out the objective of this project. CINISTMS Database webpage are able to provide a
web service to the service requestor which is CINISTMS Windows application on the
client side. CINISTMS Database webpage provide a service to store all the data sent by
clients into database which are the host’s IP address, size downloaded from the URL,
duration to reach the URL, tested URL, average speed to reach the URL and date and
time of the particular test. Besides providing a web service, CINISTMS Database
webpage are able to display all the data inside database through a webpage as for
monitoring purposes. Figure 4.4 shows the GUI of CINISTMS Database webpage.
64
As seen on figure 4.4, the table contains all the data sent by clients which are the
host’s IP address, size downloaded from the URL, duration to reach the URL, tested
URL, average speed to reach the URL and date and time of the particular test. The table
on figure 4.4 is the data sent by CINISTMS Windows application on the previous
intranet link test and internet link test. The results appeared on CINISTMS Database
webpage are the same as CINISTMS Windows application results on intranet link test
and internet link test.
CINISTMS Database webpage will display all the data sent by clients according
to date. For example, figure 4.4 shows the entire test that has been executed by
CINISTMS Windows application on April 2nd 2009.
65
As for the administrator, the data sent by clients on previous day may be
accessed by Search by Date tools located on the left of CINISTMS Database webpage.
Figure 4.5 below shows the results obtained on April 15th 2009.
CINISTMS has some limitations whereby it is not cross-platform. The terms not
cross-platform here is CINISTMS cannot run on other operating system instead
Microsoft Windows operating system which means it cannot be executed on Linux or
Mac operating system.
CHAPTER 5
5.0 Conclusions
As for the server part, CINISTMS Database webpage make the results tested by
clients easy to monitor and helpful for network administrator to do further analysis or
maintenance. CINISTMS Database webpage is able to receive the tested data sent by
clients by using web services technology and store the data inside database and display it
back for monitoring purposes.
70
5.1 Recommendations
REFERENCES
1. Alex Kriegel and Boris M. Trukhnov (2008). SQL Bible. (Second Edition).
Canada: Wiley Publishing, Inc.
2. Chong Ping Chee (2004). Client Initiated Network Monitoring and Alerting
System (CINMAS) – Monitoring Server. Universiti Teknologi Malaysia:
Bachelor’s Degree Thesis.
3. Chong Tian Teck (2006). Server of Client Initiated Network Monitoring and
Alerting System (CINMAS). Universiti Teknologi Malaysia: Bachelor’s
Degree Thesis.
4. Craig Zacker (2001). Networking: The Complete Reference. California:
Osborne/McGraw – Hill.
5. Dan Heflin and Todd Ney (2000). Windows Web Scripting Developers Guide.
USA: Osborne/McGraw – Hill.
6. Dr. Shahram Khosravi (2008). Professional IIS7 and ASP.NET Integrated
Programming. Canada: Wiley Publishing, Inc.
7. Edward Whalen, Marcilina Garcia, Burzin Patel, Stacia Misner and Viktor
Isakov (2007). Microsoft SQL Server 2005. Washington: Microsoft Press.
8. H.M Deitel and P.J Deitel (2006). Visual C# 2005 How To Program. (Second
Edition). USA: Pearson Education, Inc.
9. H.M Deitel, P.J Deitel and A.B. Goldberg (2004). Internet and World Wide
Web How To Program. (Third Edition). USA: Pearson Education, Inc.
10. Loh Hong Lee (2006). Client Initiated Network Monitoring and Alerting
System (CINMAS) – Windows Agent. Universiti Teknologi Malaysia:
Bachelor’s Degree Thesis.
11. Microsoft Developer Network. MSDN (2008).
72
12. Scott Hofmann and Hethe Henrickson (2003). IIS6: The Complete Reference.
California: Osborne/McGraw – Hill.
13. Sheeraj Shah (2007). Hacking Web Services. (First Edition). Boston:
Thomson Learning, Inc.
14. Wikipedia. Internet Information Services.
http://en.wikipedia.org/wiki/Internet_Information_Services. (Accessed on
February 2009).
15. Wikipedia. Computer network.
http://en.wikipedia.org/wiki/Computer_network. (Accessed on August 2008).
16. Wikipedia. Internet Protocol Suite. http://en.wikipedia.org/wiki/ip. (Accessed
on August 2008).
17. Wikipedia. TCP/IP model. http://en.wikipedia.org/wiki/IP_model. (Accessed
on August 2008).
18. Wikipedia. List of TCP and UDP ports numbers. http://en.wikipedia.org/wiki/
List_of_TCP_and_UDP_port_numbers. (Accessed on August 2008).
19. Wikipedia. SOAP. http://en.wikipedia.org/wiki/SOAP. (Accessed on
February 2009).
20. Wikipedia. Web service. http://en.wikipedia.org/wiki/Web_services.
(Accessed on February 2009).
21. Wikipedia. XML. http://en.wikipedia.org/wiki/Xml. (Accessed on February
2009).
73
APPENDIX A
AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CINISTMS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("CINISTMS")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a44f11d0-a11d-48d9-8bd3-dd1587ab3fa3")]
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
76
app.config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SpeedTestLogServiceSoap" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint
address="http://localhost/WebSite/CINISTMS%20Database/SpeedTestLogService.a
smx"
77
binding="basicHttpBinding" bindingConfiguration="SpeedTestLogServiceSoap"
contract="SpeedTestLogServiceReference.SpeedTestLogServiceSoap"
name="SpeedTestLogServiceSoap" />
</client>
</system.serviceModel>
</configuration>
78
Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace CINISTMS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnGo_Click(object sender, EventArgs e)
{
// Enumerate IP addresses
String ip = "";
foreach (IPAddress ipaddress in iphostentry.AddressList)
{
ip = ipaddress.ToString();
}
txtIp.Text = (ip);
}
HttpWebRequest request;
try
{
request = (HttpWebRequest)
HttpWebRequest.Create(url);
}
catch (Exception err)
{
txtContent.Text = ("Error: " + err);
txtSize.Text = ("");
txtDur.Text = ("");
txtAvg.Text = ("");
txtUrl.Focus();
return;
}
80
request.AllowAutoRedirect = true;
request.UserAgent = ("HTTP_USER_AGENT");
request.CookieContainer = CookieCont;
request.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg" +
"application/msword, application/vnd.ms-powerpoint, application/vnd.ms-
excel, */*";
HttpWebResponse response;
try
{
response = (HttpWebResponse)
request.GetResponse();
}
catch (WebException err)
{
txtContent.Text = err.Status + " - " + err.Message;
txtSize.Text = ("");
txtDur.Text = ("");
txtAvg.Text = ("");
response = (HttpWebResponse)err.Response;
if (response == null)
{
txtUrl.Focus();
return;
}
}
txtDur.Text = ("");
txtAvg.Text = ("");
txtUrl.Focus();
return;
}
// we will read data via the response stream
Stream resStream = response.GetResponseStream();
response.Close();
TimeSpan duration = DateTime.Now - requestStart;
double sec = duration.TotalSeconds;
double avg = -1;
if (sec > 0)
{
avg = Math.Round(((double)contentLength /
}
83
Program.cs
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace CINISTMS
{
static class Program
{
/// <summary>
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
84
APPENDIX B
SpeedTestLog.cs
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Data.SqlClient;
/// <summary>
string _ipAddr;
long _contentLength;
double _sec;
string _targetedUrl;
double _averageSpeed;
86
DateTime _testedDate;
public int Id
{
get
{
return _id;
}
set
{
_id = value;
}
}
public string IpAddr
{
get
{
return _ipAddr;
}
set
{
_ipAddr = value;
}
}
public long ContentLength
{
get
{
return _contentLength;
}
87
set
{
_contentLength = value;
}
}
public double Sec
{
get
{
return _sec;
}
set
{
_sec = value;
}
}
public string TargetedUrl
{
get
{
return _targetedUrl;
}
set
{
_targetedUrl = value;
}
}
public double AverageSpeed
{
88
get
{
return _averageSpeed;
}
set
{
_averageSpeed = value;
}
}
public DateTime TestedDate
{
get
{
return _testedDate;
}
set
{
_testedDate = value;
}
}
public SpeedTestLog()
{
}
public SpeedTestLog(int id, string ipAddr, long contentLength, double sec, string
targetedUrl, double averageSpeed, DateTime testedDate)
{
_id = id;
_ipAddr = ipAddr;
_contentLength = contentLength;
89
_sec = sec;
_targetedUrl = targetedUrl;
_averageSpeed = averageSpeed;
_testedDate = testedDate;
}
public void WriteToLog()
{
size.Value = ContentLength;
duration.Value = Sec;
SqlParameter tgtUrl = new SqlParameter("@tgtUrl",
System.Data.SqlDbType.NChar);
tgtUrl.Value = TargetedUrl;
tstDate.Value = TestedDate;
string commandString = "INSERT INTO dbo.SpeedTestLog (IpAddr, Size,
Duration, TargetedUrl, AverageSpeed, TestedDate)" +
"VALUES (@hostIp, @size, @duration, @tgtUrl, @avg, @tstDate)";
command.Parameters.Add(size);
command.Parameters.Add(duration);
command.Parameters.Add(tgtUrl);
command.Parameters.Add(avg);
command.Parameters.Add(tstDate);
connection.Open();
command.ExecuteNonQuery();
}
}
public static List<SpeedTestLog> ReadFromLog(string targetedUrl, DateTime
testedDate)
{
List<SpeedTestLog> result = new List<SpeedTestLog>();
string strQuery = String.Empty;
if (targetedUrl != String.Empty && testedDate == DateTime.MinValue)
{
strQuery = "Select * from SpeedTestLog Where TargetedUrl = @TargetedUrl";
}
else if (targetedUrl == String.Empty && testedDate != DateTime.MinValue)
{
strQuery = "Select * from SpeedTestLog Where DateDiff(day, TestedDate,
@TestedDate) = 0";
}
else if (targetedUrl != String.Empty && testedDate != DateTime.MinValue)
{
strQuery = "Select * from SpeedTestLog Where TargetedUrl = @TargetedUrl And
DateDiff(day, TestedDate, @TestedDate) = 0";
}
using (SqlConnection connection = new SqlConnection(_connectionString))
{
91
while (reader.Read())
{
SpeedTestLog objLog = new SpeedTestLog();
objLog.Id = Convert.ToInt32(reader["Id"]);
if (reader["IpAddr"] != DBNull.Value)
{
objLog.IpAddr = reader["IpAddr"].ToString();
}
if (reader["Size"] != DBNull.Value)
{
objLog.ContentLength = Convert.ToInt64(reader["Size"]);
}
if (reader["Duration"] != DBNull.Value)
{
objLog.Sec = Convert.ToDouble(reader["Duration"]);
}
if (reader["TargetedUrl"] != DBNull.Value)
{
objLog.TargetedUrl = reader["TargetedUrl"].ToString();
}
if (reader["AverageSpeed"] != DBNull.Value)
92
{
objLog.AverageSpeed = Convert.ToDouble(reader["AverageSpeed"]);
}
if (reader["TestedDate"] != DBNull.Value)
{
objLog.TestedDate = Convert.ToDateTime(reader["TestedDate"]);
}
result.Add(objLog);
}
}
}
return result;
}
}
93
SpeedTestLogService.cs
using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
/// <summary>
/// Summary description for SpeedTestLogService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX,
uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class SpeedTestLogService : System.Web.Services.WebService
{
public SpeedTestLogService()
{
[WebMethod]
94
objLog.ContentLength = contentLength;
objLog.Sec = sec;
objLog.TargetedUrl = targetedUrl;
objLog.AverageSpeed = averageSpeed;
objLog.TestedDate = testedDate;
objLog.WriteToLog();
}
}
95
Default.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.IO;
using System.Net;
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
calTestedDate.SelectedDate = DateTime.Today;
List<SpeedTestLog> collection = SpeedTestLog.ReadFromLog(txtTgtUrl.Text,
calTestedDate.SelectedDate);
dgTestLog.DataSource = collection;
dgTestLog.DataBind();
}
96
}
protected void btnSearch_Click(object sender, EventArgs e)
{
string url = txtTgtUrl.Text;
if (url != String.Empty && !url.StartsWith("http://") && !url.StartsWith("https://"))
{
url = "http://" + url;
}
List<SpeedTestLog> collection = SpeedTestLog.ReadFromLog(url,
calTestedDate.SelectedDate);
dgTestLog.DataSource = collection;
dgTestLog.DataBind();
}
protected void btnGo_Click(object sender, EventArgs e)
{
DateTime requestStart = DateTime.Now;
CookieContainer cookieCont = new CookieContainer();
try
{
request = (HttpWebRequest)
HttpWebRequest.Create(url);
}
catch (Exception err)
97
{
txtUrl.Text = ("Error: " + err);
txtUrl.Focus();
txtSize.Text = ("");
txtDur.Text = ("");
txtAvg.Text = ("");
return;
}
request.AllowAutoRedirect = true;
request.UserAgent = ("HTTP_USER_AGENT");
request.CookieContainer = cookieCont;
request.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, */*";
HttpWebResponse response;
try
{
response = (HttpWebResponse)
request.GetResponse();
}
catch (WebException err)
{
txtUrl.Text = err.Status + " - " + err.Message;
txtSize.Text = ("");
txtDur.Text = ("");
txtAvg.Text = ("");
response = (HttpWebResponse)err.Response;
if (response == null)
{
txtUrl.Focus();
98
return;
}
}
catch (Exception err)
{
txtUrl.Text = ("Error: " + err);
txtSize.Text = ("");
txtDur.Text = ("");
txtAvg.Text = ("");
txtUrl.Focus();
return;
}
// we will read data via the response stream
ms.Close();
resStream.Close();
response.Close();
TimeSpan duration = DateTime.Now - requestStart;
99
Default.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>CINISTMS Database</title>
</head>
<body>
<form id="form1" runat="server">
<table width="100%">
<tr>
<td width="20%" align="center" valign="top">
</td>
<td width="60%" align="center">
<img src="utm_header_new.jpg" /><br />
<br />
<br />
</td>
<td width="20%" align="center" valign="top">
</td>
</tr>
<tr>
<td width="20%" align="center" bgcolor="#F87D20"
style="border-style: solid; border-color: #FFFFFF" valign="top">
<asp:Label ID="lblHeaderAdmin" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Small" ForeColor="Black"
101
Text="ADMINISTRATIVE TOOLS"></asp:Label>
</td>
<td width="60%" align="center" bgcolor="#F87D20"
style="border-style: solid; border-color: #FFFFFF" valign="top">
<asp:Label ID="lblHeaderDatabase" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Small" ForeColor="Black"
Text="CINISTMS DATABASE"></asp:Label>
</td>
<td width="20%" align="center" bgcolor="#F87D20"
style="border-style: solid; border-color: #FFFFFF" valign="top">
<asp:Label ID="lblHeaderInternet" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Small" ForeColor="Black"
Text="INTERNET SPEED TEST"></asp:Label>
</td>
</tr>
<tr>
<td width="20%" align="center"
style="border-style: solid; border-color: #FFFFFF; background-color: #5D7B9D"
valign="top">
<br />
<asp:Label ID="lblTgtUrl" runat="server" Font-Bold="True" Font-
Names="Verdana"
Font-Size="Small" ForeColor="White" Text="Search by URL:"></asp:Label>
<br />
<br />
<asp:TextBox ID="txtTgtUrl" runat="server" Width="200px" Font-
Names="Verdana"
Font-Size="Small"></asp:TextBox>
<br />
<br />
102
Font-Names="Verdana" Font-Size="Small">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" >
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center"
/>
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<td width="20%"
style="background-color: #5D7B9D; border-style: solid; border-color: #FFFFFF"
align="center" valign="top">
<br />
<asp:Label ID="lblUrl" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" ForeColor="White" Text="URL to test:"></asp:Label>
<br />
<br />
<asp:TextBox ID="txtUrl" runat="server" Width="200px" Font-Names="Verdana"
Font-Size="Small"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblInstruction" runat="server" Font-Bold="False"
<br />
<asp:Button ID="btnGo" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Small" Text="Run Test"
onclick="btnGo_Click" BackColor="White" />
<br />
<br />
Text="Size downloaded:"></asp:Label>
<br />
<br />
<asp:TextBox ID="txtSize" runat="server" Font-Names="Verdana" Font-
Size="Small"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblDuration" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Small" ForeColor="White"
Text="Duration:"></asp:Label>
<br />
<br />
<asp:TextBox ID="txtDur" runat="server" Font-Names="Verdana" Font-
Size="Small"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblAvg" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" ForeColor="White" Text="Average speed:"></asp:Label>
<br />
<br />
<asp:TextBox ID="txtAvg" runat="server" Font-Names="Verdana" Font-
Size="Small"></asp:TextBox>
<br />
<br />
</td>
</tr>
<tr>
<td width="20%" align="center" valign="top">
</td>
</td>
</tr>
</table>
</form>
</body>
</html>
107
web.config
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="Everywhere" />
108
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="roleService"
type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="SpeedTestConnectionString" connectionString="Data
Source=AHMADNAZMI-PC\SQLEXPRESS;Initial
Catalog=InternetSpeedTest;User ID=SpeedTestUser;pwd=123456"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
109
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
111
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under
Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>