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.
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.
.NET Deployment Matt Smouse CSE775 – Distributed Objects Spring 2003.
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.
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.
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 .
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.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
ASSEMBLIES AND THE GAC CHAPTER 1, LESSONS 4-7 & LAB.
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.
Develop Distributed Applications using.NET Remoting Kate Gregory Regional Director Gregory Consulting Limited
Web Access. Overview  Purpose  Prerequisites  Install Components  Enable Virtual Directories  IIS Configuration & Security  Troubleshooting.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
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.
.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.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
ClickOnce Deployment (One-click Deployment)
Web and Proxy Server.
Windows Communication Foundation and Web Services
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Jim Fawcett CSE775 – Distributed Objects Spring 2003
Contents Software components All users in one location:
.NET Remoting Priyanka Bharatula.
Create Virtual Directory Windows 8 - IIS 8.5
Presentation 23 .NET Remoting Introduced
10: Remoting Securing System.Runtime.Remoting
Matt Smouse CSE775 – Distributed Objects Spring 2003
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 13: Administering Web Resources.
Security mechanisms and vulnerabilities in .NET
Web Caching? Web Caching:.
Implementing TMG Server Publishing
Microsoft .NET Remoting Essentials
Windows Communication Foundation and Web Services
WEB API.
Configuring Internet-related services
SOAP web services in Microsoft Azure
Matt Smouse CSE775 – Distributed Objects Spring 2003
Jim Fawcett Core Technologies Spring 2005
ClickOnce Deployment (One-click Deployment)
Jim Fawcett CSE791 – Distributed Objects Spring 2002
How to install and manage exchange server 2010 OP Saklani.
Message Passing Systems
Presentation transcript:

Matt Smouse CSE775 – Distributed Objects Spring 2003 .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 Uses of the application 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> <system.runtime.remoting> <application> <lifetime /> <channels /> <service /> <client /> </application> </system.runtime.remoting> </configuration>

Configuration Files (cont) Lifetime The <lifetime> 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 <channels> element contains the channels that your application will be using. We declare channels with the <channel> tag. The <channel> 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 <serverProviders></serverProviders> and <clientProviders></clientProviders> 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: <channels> <channel ref=“http” port=“1234”> <serverProviders> <formatter ref=“binary” /> <provider type=“MySinks.Sample, Server” /> </serverProviders> </channel> </channels>

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 <service> tag is used in the server’s configuration file to specify the remote objects that will be hosted. Contains <wellknown /> and <activated /> entries for server-activated objects (SAOs) and client-activated objects (CAOs), respectively. Valid attributes for <wellknown /> 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 <activated />

Configuration Files (cont) Client The <client> 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 <wellknown /> and <activated /> entries for server-activated objects (SAOs) and client-activated objects (CAOs), respectively. Valid attributes for <wellknown /> 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 <activated /> 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 <wellknown /> and <activated />, 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 <channel /> 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.

Soapsuds and Implementation Hiding (cont) 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) Project configuration: Include this library on the client. MySerializableObjects Server Include these libraries on the server. Client Run soapsuds and add generated source code to client project. MyRemoteObjects

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