<%@ Page EnableSessionState="ReadOnly" %>
<%
response.write("a");
%>
返回500,错在哪里,如何移掉500错误,显示具体?

解决方案 »

  1.   

    当前页面有session赋值的地方都要去掉
      

  2.   

    Response.Write("a")
    不要后面的分号";"
      

  3.   

    <%@ Page Language="C#" AutoEventWireup="true" EnableSessionState="ReadOnly" CodeFile="Login.aspx.cs"
        Inherits="Login" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <%Response.Write("a"); %>
        </div>
        </form>
    </body>
    </html>
    你是这么写的吗?
      

  4.   

    我就写了下面一句,再无其它:
    <%@ Page EnableSessionState="ReadOnly" %>
    主要是用来测试改写 session 状态为只读
      

  5.   

    是用VS调试的吗?那你新建一个项目把我代码放上去试试。我这边是可以的 .NET 3.5 sp1
      

  6.   

    你没有申明默认的页面编程语言是C#还是VB
      

  7.   

    俺用的是asp
    而且即便我如下写:
    <%@ Page Language="vb" EnableSessionState="ReadOnly" %>
    仍然报错
    试过大写"VB"也一样
      

  8.   

    你要早点说自己用的是asp. 不是asp.net
    在IE浏览器里 工具->Internet选项->高级->浏览->显示友好的http错误通知,前面的勾去掉就可以显示这个500到底是什么错
      

  9.   

    服务器给的就是500,打开也是500Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.More information about this error may be available in the server error log.
      

  10.   

    asp和asp.net是完全不同的语法,你要搞清楚是asp还是asp.net
    asp.net c#版本
    <%@ Page Language="C#" EnableSessionState="ReadOnly" %>
    <%
    Response.Write("a");
    %>
    asp.net vb版本<%@ Page Language="VB" EnableSessionState="ReadOnly" %>
    <%
    Response.Write("a")
    %>显示详细错误服务器端的设置方法将“将错误发送到浏览器”设置为true