大哥们!小弟快疯了,大家帮帮忙啊,web.config的问题?

baiye640 2007-05-15 09:54:31
小弟快疯了,程序在本地IIS调试没有一点问题,
一到服务器上就提示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>

连接字符串也没有问题!~
网址:www.bbricks.com/default.aspx
大家帮我看看怎么回事,小弟在线等!~!~
...全文
327 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
aihui109 2007-05-16
  • 打赏
  • 举报
回复
KingReturns(Life was like a box of chocolates.You never know w) ( ) 信誉:100 Blog 加为好友 2007-05-15 23:21:42 得分: 0


服务商提供空间的 .NET 版本问题



估计是~~~~最好联系空间商
lxmfll2000 2007-05-16
  • 打赏
  • 举报
回复
1.看看你的空间是不是支持.net2.0
2.看看空间文件夹给的权限是不是够。既然在自己的机器上没有问题,就要自信,肯定是发布是配置有问题。
xray2005 2007-05-16
  • 打赏
  • 举报
回复
服务商提供空间的 .NET 版本问题



估计是~~~~最好联系空间商

laneyu 2007-05-16
  • 打赏
  • 举报
回复
学习下
lingyang830 2007-05-16
  • 打赏
  • 举报
回复
没遇到过
学习下
RAY_NK 2007-05-15
  • 打赏
  • 举报
回复
链接字符串怎么写的?
KingReturns 2007-05-15
  • 打赏
  • 举报
回复
服务商提供空间的 .NET 版本问题
amwanfwbx 2007-05-15
  • 打赏
  • 举报
回复
老兄,是<customErrors mode="Off" />才能看到错误吧。
suiqirui19872005 2007-05-15
  • 打赏
  • 举报
回复
没有权限,联系空间提供商
baiye640 2007-05-15
  • 打赏
  • 举报
回复
我在重复了无数次以后,
发现,我现在就传了个小程序!~只是往数据库添加条记录,他还是出现<customErrors mode="On" />错误,我已经打开了这个设置,但是还是提示,是不是空间的问题,大哥们谁用过万网的空间!~
suiqirui19872005 2007-05-15
  • 打赏
  • 举报
回复
可能1。在虚拟目录没有打开应用程序设置
  2。Web.config 设置有问题
ishowing 2007-05-15
  • 打赏
  • 举报
回复
我这里很正常啊~~
兄弟客户管理系统?
mdl821120 2007-05-15
  • 打赏
  • 举报
回复
我以后也会遇到这个问题的,学习一下,帮顶了,到底怎么解决呢?
baiye640 2007-05-15
  • 打赏
  • 举报
回复
设置成on以后也看不出错误,继续提示原来的错误!~
CN2074 2007-05-15
  • 打赏
  • 举报
回复
<customErrors mode="Off"/>]
设置为
<customErrors mode="On"/>
看到错误才能解决
baiye640 2007-05-15
  • 打赏
  • 举报
回复
web.config代码如下:
<?xml version= "1.0 "? >
<!--
注意: 除了手动编辑此文件以外,您还可以使用
Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
“网站”- >“Asp.Net 配置”选项。
设置和注释的完整列表在
machine.config.comments 中,该文件通常位于
\Windows\Microsoft.Net\Framework\v2.x\Config 中
-- >
<configuration >
<appSettings >
<add key= "SqlConnection " value= "连接字符串 "/ >
</appSettings >
<connectionStrings >
<add name= "KH_SystemConnectionString " connectionString= "连接字符串没有问题" providerName= "System.Data.SqlClient "/ >
</connectionStrings >
<system.web >
<!--
设置 compilation debug= "true " 将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-- >
<compilation debug= "true " >
<assemblies >
<add assembly= "System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A "/ > </assemblies > </compilation >
<!--
通过 <authentication > 节可以配置 ASP.NET 使用的
安全身份验证模式,
以标识传入的用户。
-- >
<authentication mode= "Windows "/ >
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors > 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。

<customErrors mode= "RemoteOnly " defaultRedirect= "GenericErrorPage.htm " >
<error statusCode= "403 " redirect= "NoAccess.htm " / >
<error statusCode= "404 " redirect= "FileNotFound.htm " / >
</customErrors >
-- >
</system.web >
</configuration >


小弟被此问题捆饶了一天了,大侠们帮我啊!~~跪求!~!~

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧