本地运行好着,传到服务器上出现问题

天上下雨 2011-02-12 03:39:16
这是报的错误

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>


...全文
123 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 feathercloudy 的回复:]
很是奇怪呀!!我把源文件放上去没办法打开,发布过后传上去就可以打开,为什么呢?
[/Quote]
项目生成网站,放到IIS上,注意看下asp.net 的版本!
天上下雨 2011-02-12
  • 打赏
  • 举报
回复
很是奇怪呀!!我把源文件放上去没办法打开,发布过后传上去就可以打开,为什么呢?
天上下雨 2011-02-12
  • 打赏
  • 举报
回复
我的是asp.net2.0的,服务器上的iis是6.0的
vina 2011-02-12
  • 打赏
  • 举报
回复
路径问题吧
sunny_yu 2011-02-12
  • 打赏
  • 举报
回复
看下iis的配置框架是否正确!!
xiaolingwei 2011-02-12
  • 打赏
  • 举报
回复
<customErrors mode="Off"/>

<compilation debug="false"> </compilation>
<authentication mode="Windows" />

<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
添加了 两个 customErrors 标记


这里有问题
windy19871011 2011-02-12
  • 打赏
  • 举报
回复
请看下服务器上的IIS版本,和ASP.NET的版本号
sunrui521 2011-02-12
  • 打赏
  • 举报
回复
呵呵 本地正确的话 就要考虑下是不是服务器的问题 看看空间的 版本是不是支持自己的开发版本啊
天上下雨 2011-02-12
  • 打赏
  • 举报
回复
急呀~~~像各位高手求助~~
天上下雨 2011-02-12
  • 打赏
  • 举报
回复
配置文件

<?xml version="1.0" encoding="utf-8"?>

<configuration>
<appSettings/>
<connectionStrings>
<add name="strConn" connectionString="~/App_Data/data.mdb"/>
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="false"> </compilation>
<authentication mode="Windows" />
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="1024000" executionTimeout="900"/>
<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
</system.web>
</configuration>
天上下雨 2011-02-12
  • 打赏
  • 举报
回复
<customErrors mode="Off"/>已经添加了,但是还是报这个错误

62,253

社区成员

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

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

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

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