2 // HttpServerUtilityBase.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2008 Novell Inc. http://novell.com
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
34 using System.Globalization;
36 using System.Runtime.CompilerServices;
37 using System.Security.Permissions;
38 using System.Security.Principal;
39 using System.Web.Caching;
40 using System.Web.Profile;
44 [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
45 [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
46 [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
47 public abstract class HttpServerUtilityBase
49 void NotImplemented ()
51 throw new NotImplementedException ();
54 public virtual string MachineName { get { NotImplemented (); return null; } }
56 public virtual int ScriptTimeout { get { NotImplemented (); return 0; } set { NotImplemented (); } }
59 public virtual void ClearError ()
64 public virtual object CreateObject (string progID)
70 public virtual object CreateObject (Type type)
76 public virtual object CreateObjectFromClsid (string clsid)
82 public virtual void Execute (string path)
87 public virtual void Execute (string path, bool preserveForm)
92 public virtual void Execute (string path, TextWriter writer)
97 public virtual void Execute (string path, TextWriter writer, bool preserveForm)
102 public virtual void Execute (IHttpHandler handler, TextWriter writer, bool preserveForm)
107 public virtual Exception GetLastError ()
113 public virtual string HtmlDecode (string s)
119 public virtual void HtmlDecode (string s, TextWriter output)
124 public virtual string HtmlEncode (string s)
130 public virtual void HtmlEncode (string s, TextWriter output)
135 public virtual string MapPath (string path)
141 public virtual void Transfer (string path)
146 public virtual void Transfer (string path, bool preserveForm)
151 public virtual void Transfer (IHttpHandler handler, bool preserveForm)
156 public virtual void TransferRequest (string path)
161 public virtual void TransferRequest (string path, bool preserveForm)
166 public virtual void TransferRequest (string path, bool preserveForm, string method, NameValueCollection headers)
171 public virtual string UrlDecode (string s)
177 public virtual void UrlDecode (string s, TextWriter output)
182 public virtual string UrlEncode (string s)
188 public virtual void UrlEncode (string s, TextWriter output)
193 public virtual string UrlPathEncode (string s)
199 public virtual byte [] UrlTokenDecode (string input)
205 public virtual string UrlTokenEncode (byte [] input)