.NET Deployment Matt Smouse CSE775 – Distributed Objects Spring 2003.

Slides:



Advertisements
Similar presentations
Enabling Secure Internet Access with ISA Server
Advertisements

1 G2 and ActiveSheets Paul Roe QUT Yes Australia!
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 13: Administering Web Resources.
Module 5: Configuring Access to Internal Resources.
Copyright © 2002 Landl Software, Inc. All Rights Reserved. Twin Cities.NET Users Group Next Meeting - Thursday, April 4, 2002 A Look Inside Reflection.
.NET Remoting in Delphi and C# Alain “Lino” Tadros President & CEO Falafel Software Inc. ComponentScience Inc. BORCON 2004.
.NET REMOTING CertSIG Tom Perkins. FUNDAMENTALS Distributed Applications Process A Process B Process C Objects can communicate across process boundaries.
Windows Communication Foundation and Web Services.
1 Advanced Programming Topics - II Objectives:  Background  Remoting  Types of remoting  Marshalling  Farmatters  Channels.
.Net Remoting Jim Fawcett CSE775 – Distributed Objects Spring 2004.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Create Windows ® Applications with.NET Allan Knudsen.NET Developer Evangelist Microsoft.
Hands-On Microsoft Windows Server 2003 Administration Chapter 7 Administering Web Resources in Windows Server 2003.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 10: Server Administration.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
.NET Health Monitoring Jonathan Franco ITD Application Services.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 7 Configuring File Services in Windows Server 2008.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Linux Operations and Administration
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
February 24 th -25 th 2004 Daragh Byrne – EPCC Additional.NET Concepts.
Deployment of web Site. Preparing the web site for deployment you now have two versions of web site 1 -one running in the production environment 2-one.
.NET Remoting Architecture. Slide 2 CITE 4420.NET Remoting Topics Remoting Boundaries Crossing the Boundaries Distributed Applications Marshalling Channels.
.Net Remoting. 2 Distributed Computing under.Net In.Net, there are three levels of access to distributed computing machinery: In.Net, there are three.
Understanding Code Compilation and Deployment Lesson 4.
Session 10 Windows Platform Eng. Dina Alkhoudari.
Microsoft Internet Information Services 5.0 (IIS) By: Edik Magardomyan Fozi Abdurhman Bassem Albaiady Vince Serobyan.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
1 Chapter 28 Networking. 2 Objectives F To comprehend socket-based communication in Java (§28.2). F To understand client/server computing (§28.2). F To.
.Net Remoting The Other RPC Architecture Doug Gregory October 27, 2003.
IIS and.Net security -Vasudha Bhat. What is IIS? Why do we need IIS? Internet Information Services (IIS) is a Web server, its primary job is to accept.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Configuring and Deploying Web Applications Lesson 7.
.NET Mobile Application Development XML Web Services.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
OE-NIK HP Advanced Programming WCF WCF SOAP service, host, client Exception handling (NOT required)
.NET Remoting. Remoting Introduction The process of programs or components interacting across certain boundaries either different processes or machines.
Web Server Administration Chapter 6 Configuring a Web Server.
Windows Communication Foundation and Web Services
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Jim Fawcett CSE775 – Distributed Objects Spring 2003
.NET Remoting Priyanka Bharatula.
Presentation 23 .NET Remoting Introduced
10: Remoting Securing System.Runtime.Remoting
Matt Smouse CSE775 – Distributed Objects Spring 2003
Implementing TMG Server Publishing
Microsoft .NET Remoting Essentials
Windows Communication Foundation and Web Services
WEB API.
Configuring Internet-related services
Matt Smouse CSE775 – Distributed Objects Spring 2003
Jim Fawcett Core Technologies Spring 2005
Jim Fawcett CSE791 – Distributed Objects Spring 2002
Matt Smouse CSE775 – Distributed Objects Spring 2003
Presentation transcript:

.NET Deployment Matt Smouse CSE775 – Distributed Objects Spring 2003

Outline Deployment issues Configuration files Soapsuds and implementation hiding Server Deployment with Windows Services Server Deployment with IIS Client Deployment with IIS

Deployment Issues Change in server location  Does the client hard-code the location and port of remote objects on the server? Uses of the application  Will this application be used in other ways? For instance, LAN vs Internet use. New/additional remotable objects  Will we be adding remotable objects after we have built the application? Web deployment Implementation hiding  Do we want to allow the client to disassemble our code?

Configuration Files Rather than hard-code the registration of remote objects and their channels, we can use a configuration file. Using a configuration file allows us to do the following without recompiling the server or client:  Change the type of channel that is used  Add additional remotable objects  Change the lifetime settings of remotable objects  Add message sinks or formatters to the server or client This functionality is available through the System.Runtime.Remoting assembly.

Configuration Files (cont) A configuration file is an XML document that is loaded by the server or client. Use two different configuration files for the client and the server. On the server, load the configuration file using RemotingConfiguration.Configure(“MyServer.exe.config”); On the client, load the configuration file using RemotingConfiguration.Configure(“MyClient.exe.config”); After loading the configuration file on the client, simply call new on the remotable object class to create a proxy.

Configuration Files (cont) Content and structure

Configuration Files (cont) Lifetime  The tag allows you to change the lifetime of your remotable objects.  Valid attributes: leaseTime – This is the initial lease time that an object will have to live before it is destroyed. sponsorshipTimeout – The time to wait for a sponsor’s reply. renewOnCallTime – This is the additional lease time that is added with each call on the remote object. leaseManagerPollTime – Specifies when the object’s current lease time will be checked.  Note that these apply to Singleton and Client-Activated objects only.

Configuration Files (cont) Channels  The element contains the channels that your application will be using. We declare channels with the tag.  The tag specifies the type, port, and other properties for a particular channel.  Valid attributes: ref – “http” or “tcp” displayName – Used for.NET Framework Configuration Tool type – if ref is not specified, contains namespace, classname, and assembly of the channel implementation. port – server side port number. Use 0 on the client if you want to get callbacks from the server. name – Unique names to specify multiple channels (use “”) priority – Sets priority of using one channel over another.

Configuration Files (cont) Channels  Valid attributes (cont): clientConnectionLimit – Number of simultaneous connections to a particular server (default = 2) proxyName – name of the proxy server proxyPort – port of the proxy server suppressChannelData – specifies whether a channel will add to the ChannelData that is sent when an object reference is created useIpAddress – specifies whether the channel should use IP addresses in URLs rather than hostname of the server listen – setting for activation hooks into listener service bindTo – used with computers that have multiple IP addresses machineName – overrides useIpAddress rejectRemoteRequests (tcp only) – sets local communication only

Configuration Files (cont)  Providers Sink and formatter providers allow the user to specify the manner in which messages are generated and captured by the framework for each channel. Both the client and server may specify settings for The tags and contain the individual settings for each provider or formatter that you wish to set. You can specify one formatter and multiple provider settings. You must place the settings in the order shown:

Configuration Files (cont)  Example channel entry for a server:

Configuration Files (cont)  Providers (cont) Available attributes for formatters and providers:  ref – “soap”, “binary”, or “wsdl”  type – if ref is not specified, contains namespace, classname, and assembly of the sink provider implementation.  includeVersions (formatter only) – specifies whether version information is included with object requests  strictBinding (formatter only) – specifies whether the server must use an exact type and version for object requests

Configuration Files (cont) Service  The tag is used in the server’s configuration file to specify the remote objects that will be hosted.  Contains and entries for server- activated objects (SAOs) and client-activated objects (CAOs), respectively.  Valid attributes for type – Specifies the namespace, classname, and assemblyname of the remote object. mode – Singleton or SingleCall objectUri – Important for IIS hosting (URIs must end in.rem or.soap, as those extensions can be mapped into the IIS metabase. displayName – Optional, used by.NET Framework configuration tool.  Valid attributes for type – Specifies the namespace, classname, and assemblyname of the remote object.

Configuration Files (cont) Client  The tag is used in the client’s configuration file to specify the types of remote objects that it will use.  Contains attribute for the full URL to the server if using CAOs.  Contains and entries for server- activated objects (SAOs) and client-activated objects (CAOs), respectively.  Valid attributes for url – The full URL to the server’s registered object type - Specifies the namespace, classname, and assemblyname of the remote object. displayName – Optional, used by.NET Framework configuration tool  Valid attributes for type – Specifies the namespace, classname, and assemblyname of the remote object.

Configuration Files (cont) Usage notes:  Errors in your configuration file cause the framework to instantiate a local copy of the remote object rather than a proxy when you call new on it. Check the IsTransparentProxy method to be sure you are using a remote object.  When you specify assembly names in your and, don’t include the extension (.dll or.exe).  You only have to specify the features that you want/need in your configuration file.  You don’t have to use the setting on the client if you use the default “http” or “tcp” channels on the server. You must specify a port on the server.

Soapsuds and Implementation Hiding The first thing that you may notice when using.NET remoting is that the remote object assemblies must be present on the client. We can get away with using interfaces to hide implementation if we stick with programmatic remoting configuration.  Create an assembly that contains interfaces which can be included on the client machine.  Create another assembly which contains the remote object implementations of the interfaces you specified earlier.  Call Activator.GetObject on the client when you want a class that implements the interface you specify.

Example: In the shared assembly: public interface IExampleClass {…} In the assembly on the server: public class ExampleClass : MarshalByRefObject, IExampleClass {…} On the client: IExampleClass iec = (IExampleClass) Activator.GetObject( typeof(IExampleClass), “tcp://localhost:1234/ExampleClass”); Soapsuds and Implementation Hiding (cont)

Soapsuds is a Visual Studio tool that allows you to extract metadata from an assembly. The new assembly contains no implementation detail, just meta (type) information. If our application contains only remote objects and no customized [serializable] objects, then we can just run soapsuds on the assembly containing our remote objects and include the new assembly on the client. soapsuds -ia:MyRemoteObjects -nowp -oa:MyRemoteMeta.dll Soapsuds and Implementation Hiding (cont)

If our application does include custom [serializable] objects that are passed between domains, then we can’t just generate a new assembly. We have to use generated source code that describes the remote object metadata. soapsuds -ia:MyRemoteObjects –nowp –gc Note that this does not include objects that are native to the framework, i.e. strings, FileInfo, DirectoryInfo, etc. If our application only uses these types of [serializable] objects, then generating a “meta” assembly will work fine.

Soapsuds and Implementation Hiding (cont) MyRemoteObjects MySerializableObjects ServerClient Run soapsuds and add generated source code to client project. Project configuration: Include these libraries on the server. Include this library on the client.

Server Deployment with Windows Services A.NET windows service inherits from System.ServiceProcess.ServiceBase Place your application specific code in the OnStart(..) method. You have to provide an installer class along with your windows service class. Using a windows service allows you to do event logging If your service does remoting, you have to place the configuration file in c:\WINNT\system32 Install the service using installutil YourServiceName.exe After you’ve installed the service, you can start it using the Microsoft Management Console.

Server Deployment with IIS If you are concerned about security, then IIS hosting is the best way to go. Authentication and encryption features are available through IIS. Remote objects are now hosted in IIS; there is no Main() in the server. Updates to the server are easy: just copy over the remote object assembly and web.config file. IIS will automatically read the new data.

Server Deployment with IIS Procedure:  Create a class library for your remotable objects  Build the assembly for the class library  Create a web.config file for the server  Create a virtual directory on the host machine  Set the desired authentication methods for the directory  Place the web.config file in the virtual directory  Create a /bin directory in the virtual directory  Place the remotable object assembly in the virtual directory  Create a client and configuration file

Client Deployment with IIS By placing a WinForm application in a virtual directory, we can stream it to clients. When a URL is selected by a client machine, an HTTP request is sent to the server, which streams the application back to the client. The application is then stored in the browser cache and also the.NET download cache. The runtime opens the application automatically and also makes requests for additional assemblies and files as necessary. Be sure to put any remoting configuration files in the virtual directory with the client application.

End of Presentation