日期:2014-05-18  浏览次数:20407 次

GridView分页错误,可能与服务器网站服务有关
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>
 
上面GridView翻页操作是出现的错误,在本机上测试正常,以本机为服务器让其它机器访问也没有问题,放到服务器上在服务器上运行也不出错,但在其它机器上访问服务器就报上面的错误!在其它地方查了一下,说是服务器网站服务的问题,但不知道怎么做,请高手指导指导,谢谢

------解决方案--------------------
上面GridView翻页操作是出现的错误,在本机上测试正常,以本机为服务器让其它机器访问也没有问题,放到服务器上在服务器上运行也不出错,但在其它机器上访问服务器就报上面的错误!在其它地方查了一下,说是服务器网站服务的问题,但不知道怎么做,请高手指导指导,谢谢
你的连接字符串是不是没有改?

放倒别的机器上连接地址应该你 SQL/Oracle 等数据服务的地址
而不是 Localhost 了
------解决方案--------------------
贴你的代码出来看看吧,能显示第一页的数据,表示数据库连接没问题,估计是你的分页代码有问题
------解决方案--------------------
探讨
贴你的代码出来看看吧,能显示第一页的数据,表示数据库连接没问题,估计是你的分页代码有问题

------解决方案--------------------
“在我的电脑上以我的电脑作为服务器用别的电脑访问分页不会有问题 放到服务器上去之后,在服务器上也不会出问题,但到了客户机访问就会出这样的问题.”肯定了。你不知道放在服务器上是要远程访问的吗??你就根据你的报错信息。在配置文件中加入
 <system.web> 
<customErrors mode="Off"/> 
</system.web> 
好像<asp:GridView 中有个属性可以控制你找找看哦。 >
------解决方案--------------------
用trace看看在服务器上问题出在哪里
------解决方案--------------------
不会吧,我们没碰到过,没有像楼主的问题