我局域网上有个A机器,win2000,服务器版。。我在A安装上.net framwork 2.0,
然后运行我在B机器用vs2005编写的c#的aspx运行是总是出现这个错误,请大家帮我。相信这个是个经常有的问题。
Server Error in '/' Application.
--------------------------------------------------------------------------------Runtime Error 
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
 

解决方案 »

  1.   

    请先确认你的iis的.NET选项卡是使用的.NET 2.0
    再确认你的程序没有错?
      

  2.   

    首先,就是运行简单的aspx文件有时候不出错,可是连接数据库的时候大部分都会出错。
    而且有时候好像没有web.config文件好像不出错,里面有这个文件就出错。以上都是推测,也不是绝对的。回复楼上:2000服务器版直接带iis,我又安装了.net framwork 2.0,然后什么也没有设置过,也不知道怎么设置。也不知道那个选项卡在哪里,所以,请继续帮助,谢谢。
      

  3.   

    就是运行简单的aspx文件有时候不出错,比如放个按钮可以正常显示。有连接数据库,插入数据库语句也可以。都成功了。但是放了个GridView之后完蛋了。
      

  4.   

    是不是里面的web.config有问题呢。我的目录里没有这个文件。
      

  5.   

    各位,我搜索了一下,关于上面的错误“<customErrors mode="Off"/> ”,这个错误,好多人都看到了。非常多的人,具体怎么解决的,但是没有人说出来。我也不知道自己的解决方法对不对,但是肯定是蒙对了。我认为原因就出在我那个图的第二个红色框框那里,在我的根目录下没有web.config文件!!!
    每个网站一般都是自己一个文件夹,这个文件夹里面一般也有web.config文件,但是没有人想到根目录下应该有一个。只要拷贝一个过去,就不出错了。希望大家记住。