我一直在从事一个asp.net
必须在 IIS 7.5 上以集成模式工作的项目。
当我使用 时Response.write("sometext")
,用废旧标签IIS
包裹我的文本。HTML
看看这段代码:
protected void Application_BeginRequest(object sender, EventArgs e)
{
Response.Clear();
Response.ClearContent();
StringBuilder sb = new StringBuilder();
sb.Append("<html>");
sb.Append("<head>");
sb.Append("</head>");
sb.AppendFormat("<body>");
sb.AppendFormat("some text");
sb.Append("</body>");
sb.Append("</html>");
Response.Write(sb.ToString());
Response.End();
}
我希望从服务器收到这个:
<html>
<head>
</head>
<body>
sometext
</body>
</html>
但服务器给了我这个:
<html>
<head>
</head>
<body>
<pre>
<html><head></head><body>sometext</body></html>
</pre>
</body>
</html>
有什么问题??
应用程序在VS web developer server
或IIS
(在经典模式下)运行良好。