HttpServerUtility类的常用方法
类别:编程学习 浏览量:1382
时间:2014-3-20 HttpServerUtility类的常用方法
HttpServerUtility类的常用方法HttpServerUtility是一个工具类,为了在后台处理请求方便获取到一些常用的类型,Asp.net将很多常用的东西封装到这里。
HttpServerUtility类的常用的方法及注释
// 获取服务器的计算机名称。
public string MachineName { get; }
// 获取和设置请求超时值(以秒计)。
public int ScriptTimeout { get; set; }
//清除前一个异常。
public void ClearError();
//创建 COM 对象的服务器实例,该 COM 对象由对象的程序标识符 (ProgID) 标识。
public object CreateObject(string progID);
//创建由对象类型标识的 COM 对象的一个服务器实例。
public object CreateObject(Type type);
//创建 COM 对象的服务器实例,该对象由对象的类标识符 (CLSID) 标识。
public object CreateObjectFromClsid(string clsid);
//在当前请求的上下文中执行指定虚拟路径的处理程序。
public void Execute(string path);
//在当前请求的上下文中执行指定虚拟路径的处理程序,并指定是否要清除 System.Web.HttpRequest.QueryString 和 System.Web.HttpRequest.Form
public void Execute(string path, bool preserveForm);
// 在当前请求的上下文中执行指定虚拟路径的处理程序。System.IO.TextWriter 捕获执行的处理程序的输出。
public void Execute(string path, TextWriter writer);
//在当前请求的上下文中执行指定虚拟路径的处理程序。System.IO.TextWriter 捕获执行的处理程序的输出,布尔参数则指定是否要清除 System.Web.HttpRequest.QueryString
public void Execute(IHttpHandler handler, TextWriter writer, bool preserveForm);
//在当前请求的上下文中执行指定虚拟路径的处理程序。System.IO.TextWriter 捕获页面输出,布尔参数则指定是否要清除 System.Web.HttpRequest.QueryString
//和 System.Web.HttpRequest.Form 集合。
public void Execute(string path, TextWriter writer, bool preserveForm);
//返回前一个异常。
public Exception GetLastError();
//对 HTML 编码的字符串进行解码,并返回已解码的字符串。
public string HtmlDecode(string s);
//对 HTML 编码的字符串进行解码,并将结果输出发送到 System.IO.TextWriter 输出流。
public void HtmlDecode(string s, TextWriter output);
//对字符串进行 HTML 编码并返回已编码的字符串。
public string HtmlEncode(string s);
//对字符串进行 HTML 编码,并将结果输出发送到 System.IO.TextWriter 输出流。
public void HtmlEncode(string s, TextWriter output);
//返回与 Web 服务器上的指定虚拟路径相对应的物理文件路径。
public string MapPath(string path);
//对于当前请求,终止当前页的执行,并使用指定的页 URL 路径来开始执行一个新页。
public void Transfer(string path);
//终止当前页的执行,然后使用一个实现 System.Web.IHttpHandler 接口的自定义 HTTP 处理程序开始新请求的执行,并指定是否要清除
//System.Web.HttpRequest.QueryString 和 System.Web.HttpRequest.Form 集合。
public void Transfer(IHttpHandler handler, bool preserveForm);
//终止当前页的执行,并使用指定的页 URL 路径来开始执行一个新页。指定是否清除 System.Web.HttpRequest.QueryString和 System.Web.HttpRequest.Form 集合。
public void Transfer(string path, bool preserveForm);
//异步执行指定的 URL。
public void TransferRequest(string path);
//异步执行指定的 URL 并保留查询字符串参数。
public void TransferRequest(string path, bool preserveForm);
//使用指定的 HTTP 方法和标头异步执行指定的 URL。
public void TransferRequest(string path, bool preserveForm, string method, NameValueCollection headers);
//对字符串进行 URL 解码并返回已解码的字符串。
public string UrlDecode(string s);
//对在 URL 中接收的 HTML 字符串进行解码,并将结果输出发送到 System.IO.TextWriter 输出流。
public void UrlDecode(string s, TextWriter output);
//对字符串进行 URL 编码,并返回已编码的字符串。
public string UrlEncode(string s);
//对字符串进行 URL 编码,并将结果输出发送到 System.IO.TextWriter 输出流。
public void UrlEncode(string s, TextWriter output);
//对 URL 字符串的路径部分进行 URL 编码并返回编码后的字符串。
public string UrlPathEncode(string s);
//将 URL 字符串标记解码为使用 64 进制数字的等效字节数组。
public static byte[] UrlTokenDecode(string input);
//将一个字节数组编码为使用 Base 64 编码方案的等效字符串表示形式,Base 64 是一种适于通过 URL 传输数据的编码方案。
public static string UrlTokenEncode(byte[] input);
热门推荐
- vue前端打包发布教程(Vue项目打包、合并及压缩优化网页响应速度)
- html5 web技术(html5视频常用API接口的实战示例)
- php类的属性和方法(PHP进阶学习之反射基本概念与用法分析)
- python图书馆管理系统源码(python实现图书借阅系统)
- python学生管理系统与数据库(python学生管理系统学习笔记)
- dedecms手机独立域名(DedeCMS Wap.php 绑定域名的解决办法)
- 阿里云服务器可以连接几个面板(阿里云云服务器宝塔面板的安装图文教程详解)
- linux服务器安装宝塔(linux宝塔面板安装Zabbix监控服务器资源使用状态)
- nginx 配置https(Nginx下配置Https证书详细过程)
- centos7 离线安装nginx(centos8安装nginx1.9.1的详细过程)