RemotingService.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / ManagedLibraries / Remoting / Services / RemotingService.cs / 1305376 / RemotingService.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
namespace System.Runtime.Remoting.Services
{ 
    using System.Diagnostics; 
    using System.Web;
    using System.ComponentModel; 
    using System.Web.SessionState;
    using System.Security.Principal;
    using System.Runtime.Remoting.Channels;
 
    public class RemotingService : Component
 	{ 
        public HttpApplicationState Application 
		{
            get { 
                return Context.Application;
            }
        }
 
        public HttpContext Context
		{ 
            get { 
                HttpContext context = HttpContext.Current;
                if (context == null) 
                    throw new RemotingException(CoreChannel.GetResourceString("Remoting_HttpContextNotAvailable"));
                return context;
            }
        } 

        public HttpSessionState Session 
		{ 
            get {
                return Context.Session; 
            }
        }

        public HttpServerUtility Server 
 		{
            get { 
                return Context.Server; 
            }
        } 

        public IPrincipal User
		{
            get { 
                return Context.User;
            } 
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
namespace System.Runtime.Remoting.Services
{ 
    using System.Diagnostics; 
    using System.Web;
    using System.ComponentModel; 
    using System.Web.SessionState;
    using System.Security.Principal;
    using System.Runtime.Remoting.Channels;
 
    public class RemotingService : Component
 	{ 
        public HttpApplicationState Application 
		{
            get { 
                return Context.Application;
            }
        }
 
        public HttpContext Context
		{ 
            get { 
                HttpContext context = HttpContext.Current;
                if (context == null) 
                    throw new RemotingException(CoreChannel.GetResourceString("Remoting_HttpContextNotAvailable"));
                return context;
            }
        } 

        public HttpSessionState Session 
		{ 
            get {
                return Context.Session; 
            }
        }

        public HttpServerUtility Server 
 		{
            get { 
                return Context.Server; 
            }
        } 

        public IPrincipal User
		{
            get { 
                return Context.User;
            } 
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK