HOW TO START AN ASP.NET 2.0 APPLICATION

yelpframeΑσφάλεια

4 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

53 εμφανίσεις


HOW TO START AN ASP.NET
2.0 APPLICATION
INTEGRANOVA USER INTERFACE
TRANSFORMATION ENGINE WEB
ASP.NET 2.0
Last Update: September 2008 How To Start an ASP.NET 2.0 application / UIT_ASP2
Table of Contents
1 Document purpose ...................................................................................................................2
1.1 What is the use of this document?..................................................................................2
2 Structure ........................................................................................................................................2
2.1 Which are the parts of the application?.........................................................................2
2.1.1 Data Base / Persistence............................................................................................................... 2
2.1.2 Server / Business Logic................................................................................................................ 2
2.1.3 Client / User Interface.................................................................................................................. 2
2.2 Which pre-requirements are needed to work with an ASP.NET 2.0
application ........................................................................................................................................2
3 How to obtain an ASP.NET 2.0 application through the STAR system ......3
4 How to open an ASP.NET 2.0 application with Visual Studio 2005
environment .....................................................................................................................................5
4.1 Setting up the ASP.NET 2.0 application ........................................................................5
4.2 Create a virtual folder ..........................................................................................................7
4.3 Debugging an ASP.NET Client with a C# Server .......................................................9
© Integranova, S.A. 2011 1 How To Start an ASP.NET 2.0 application / UIT_ASP2
1 Document purpose
1.1 What is the use of this document?
This document shows how to start working with an ASP.NET 2.0 application.
2 Structure
2.1 Which are the parts of the application?
2.1.1 Data Base / Persistence
It is the part where the data is stored. The server accesses to the data base each time a
query or a service is done by means of ODBC. It is not possible to access directly to the
database from the Client part.
2.1.2 Server / Business Logic
The server is an ActiveX DLL or an Enterprise Java Beans Server that has all the services
of the system defined and allows to do queries over the population of the classes.
2.1.3 Client / User Interface
This is the part from which the user can execute all kind of services and queries. This is
what the user sees. This is the part in which this document is focused.
2.2 Which pre-requirements are needed to work
with an ASP.NET 2.0 application
It is needed to have Microsoft® Visual Studio 2005 (version 8) with Microsoft Visual C#
and Microsoft .Net Framework 2.0 installed.
It is also needed to have almost ASP.NET AJAX 1.0 installed. It’s available on
http://ajax.asp.net
Previous versions of Visual Studio 2005 required that the operating system had IIS
installed in order to be able to work with ASP.NET applications. This is no longer required
since Visual Studio 2005 is distributed with an embedded web server (cassini) that allows
you to work with ASP.NET applications.
If desired, it's also possible to work with the ASP.NET application hosted in a IIS web
server and Visual Studio 2005.
When the web server used is the IIS, it is necessary that the ASP.NET 2.0 user is
registered inside the IIS. To do this, it is necessary to use the following command line:
The ASP.NET 2.0 account needs to have Administrator privileges in the development
© Integranova, S.A. 2011 2 How To Start an ASP.NET 2.0 application / UIT_ASP2
computer in order to run correctly.
The ASP.NET 2.0 account must not have Administrator privileges if the application is
running in a Windows 2000 Server or Windows XP production environment. Under
Windows 2003 Server the ASP.NET runtime does not use the ASPNET user.
3 How to obtain an ASP.NET 2.0 application
through the STAR system
Open the STAR Client application.
Add a new ASP.NET 2.0 profile.
Figure 1 ASP.NET 2.0 profile
Fill in the properties with the desired values.
© Integranova, S.A. 2011 3 How To Start an ASP.NET 2.0 application / UIT_ASP2
Figure 2 ASP.NET 2.0 properties

Send your request to the STAR system.
Figure 3 STAR options
© Integranova, S.A. 2011 4 How To Start an ASP.NET 2.0 application / UIT_ASP2
Indicate where you want to receive the code:
Figure 4 STAR receiving folder
You will receive an e-mail that indicates where you can download the generated code.
4 How to open an ASP.NET 2.0 application
with Visual Studio 2005 environment
4.1 Setting up the ASP.NET 2.0 application
The first step to do is unzip the code sent by the STAR system to any folder. After that,
run the Visual Studio 2005 environment and choose the option File Open Web Site… In
this dialog ,select the unzipped code folder.
© Integranova, S.A. 2011 5 How To Start an ASP.NET 2.0 application / UIT_ASP2
Figure 5 Open Web Site option
The ASP.NET 2.0 web site is only the “Presentation Layer” of the application, so you need
the “Business Logic Layer” to have a full application.
To connect with a “Business Logic Layer”, you have to define the connection with the
server. In file Web.config there are defined three different connections:
<!--Native .NET connection (net://server_name:server_namespace)-->
<add key="ConnectionString" value="net://JP004A9Srv:JP004A9SrvNS" />
<!--COM connection (com://server_namespace.XML)-->
<!--<add key="ConnectionString" value="com://JP004A9SrvNS.XML" />-->
<!--HTTP connection (http://host:port/server_name/invxml)-->
<!--<add key="ConnectionString" value="http://host:8080/JP004A9Srv/invxml"
/>-->
The .NET and COM connection needed with a C# server. The HTTP connection can be used
with a C# server or an EJB server.
The last step is to set the start up page. In this case select the
InteractionToolkit\MainPage.aspx as the start up page.
© Integranova, S.A. 2011 6 How To Start an ASP.NET 2.0 application / UIT_ASP2
Figure 6 Set Start Up page

4.2 Create a virtual folder
To run the ASP.NET 2.0 application without Visual Studio, you should create a virtual
folder, because this is a web application and it’s needed to have an URL in which the
application is going to be accessible.
In the STAR options for the ASP.NET 2.0 translator service it is specified the URL (in the
example: http://localhost/ExpenseReport/InteractionToolkit/MainPage.aspx ).
Select the main folder of the application.
Figure 7 Folder structure
© Integranova, S.A. 2011 7 How To Start an ASP.NET 2.0 application / UIT_ASP2
Click the right button of the mouse and select the properties entry of the popup menu.
Figure 8 Popup Menu
Select the Web Sharing tab and click on the option “Share this folder”.
Figure 9 Web sharing properties
Fill in the fields of the virtual folder.
Note: the Alias (ExpenseReport) should be the same as the Application URL.
© Integranova, S.A. 2011 8 How To Start an ASP.NET 2.0 application / UIT_ASP2
Figure 10 Virtual folder
4.3 Debugging an ASP.NET Client with a C# Server
If it is needed to debug a full application (Server side and Client side), a solution with the
two projects has to be created. To do so, follow the next actions:
Configure the ASP.NET Client properly, specifying the correct name and the appropriate
namespace of the C# Server project.
Then, the C# Server project has to be added in the solution (with Add Project option).
After add the project, a new reference will be added to hook the Client project with the
Server project (see Figure 11-Figure 13).

Figure 11 Add a project to the solution
© Integranova, S.A. 2011 9 How To Start an ASP.NET 2.0 application / UIT_ASP2
Figure 12 Add a reference to the server in the client
Figure 13 Add a project reference
When these actions are completed, it is needed to regenerate the C# Server project and
the C# Client project.
© Integranova, S.A. 2011 10