关于网站发布的问题

aplesen 2010-08-01 09:53:46
我做的网站(sql2005和vs2008,c#)在本机和局域网服务器上测试都没问题,买了个域名和空间以后我就把网站发布上去,但是空间商提供的数据库是2000的,于是我把数据库搞成2000的。现在的问题是部分网页没问题,部分网页报错

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>


正常的页面也有访问数据库,报错的页面没有用什么特殊的控件。为什么,大侠帮个忙啊,昨天加班搞数据库,今天还要加班。救命啊大侠
...全文
113 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
aplesen 2010-08-04
  • 打赏
  • 举报
回复
算了,不用他们空间了,自己买个服务器吧
wangprince 2010-08-02
  • 打赏
  • 举报
回复
可能1:文件访问权限问题。有没有什么上传啊、下载之类的页。
解决办法:开服务器上文件的访问权限。
可能2:服务器不支持2008,.net3.0,只支持2005.,.net2.0
解决办法1:让服务器支持2008.,.net3.0
解决办法2:如果不是必须,删除那些08里有但05里没有的包。包括web.config里的配置也要改成2.0配置。
gs8716 2010-08-02
  • 打赏
  • 举报
回复
服务器的权限问题,可能是没有写入权限。
aplesen 2010-08-02
  • 打赏
  • 举报
回复
MingLiu.MingLiuWeb.EmployeeManagement.RepairSignIn..ctor() in D:\work\MingLiuTeam\MinLiu\MingLiuWeb
上面的错误 下面有条这样的 怎么是本地路径呢 这个有什么问题吗?
aplesen 2010-08-02
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 zzk87 的回复:]
权限问题。。确保空间支持你这个版本的.NET 。。
[/Quote]
空间商说支持的啊,晕死哇
even0220 2010-08-02
  • 打赏
  • 举报
回复
服务器的IIS是否设置正常。
aplesen 2010-08-02
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 wangprince 的回复:]
可能1:文件访问权限问题。有没有什么上传啊、下载之类的页。
解决办法:开服务器上文件的访问权限。
可能2:服务器不支持2008,.net3.0,只支持2005.,.net2.0
解决办法1:让服务器支持2008.,.net3.0
解决办法2:如果不是必须,删除那些08里有但05里没有的包。包括web.config里的配置也要改成2.0配置。
[/Quote]

D:\work\MingLiuTeam\MinLiu\MingLiuWeb 这个路径是我开发项目时,我的本机路径。 我很奇怪啊
aplesen 2010-08-01
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 q107770540 的回复:]
在客户端是看不到具体错误的
最好到IIS内运行网站,查看具体错误原因
[/Quote]

我在局域网内发布没问题,但是发布到空间就有问题了。
aplesen 2010-08-01
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 liu2008hz 的回复:]
引用楼主 aplesen 的回复:
正常的页面也有访问数据库,报错的页面没有用什么特殊的控件

问题也许不是出在数据库上呢
[/Quote]
嗯 我也这么想,
aplesen 2010-08-01
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 wuyq11 的回复:]
修改 <customErrors mode="Off"/>
看看具体错误
[/Quote]
嗯 我设置 但是现在报这个错误

Server Error in '/' Application.
--------------------------------------------------------------------------------

拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:


[No relevant source lines]


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9cd5fe6d\f60df9ac\App_Web_undeaosc.0.cs Line: 0

Stack Trace:


[UnauthorizedAccessException: 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]

[FileLoadException: Could not load file or assembly '_TempEntityImpNamespace._Impl_SingIn, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 拒绝访问。]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) +26
System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +85
Websharp.ORM.Base.EntityClassGenerator.GenerateEntityType(Type entityType) +1179
Websharp.ORM.Base.EntityManager.CreateObject(Type entityType) +127
MingLiu.MingLiuWeb.EmployeeManagement.RepairSignIn..ctor() in D:\work\MingLiuTeam\MinLiu\MingLiuWeb\EmployeeManagement\RepairSignIn.aspx.cs:40
ASP.mingliuweb_employeemanagement_repairsignin_aspx..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9cd5fe6d\f60df9ac\App_Web_undeaosc.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath virtualPath, String inputFile, HttpContext context) +224
System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context) +121
Eden.Web.RunTime.UrlManager.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) +159
Eden.Web.RunTime.UrlManager.UrlReWriteHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +49
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +193
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614
Eeleng 2010-08-01
  • 打赏
  • 举报
回复
不会学习学习
Hertz_liu 2010-08-01
  • 打赏
  • 举报
回复
[Quote=引用楼主 aplesen 的回复:]
正常的页面也有访问数据库,报错的页面没有用什么特殊的控件
[/Quote]
问题也许不是出在数据库上呢
q107770540 2010-08-01
  • 打赏
  • 举报
回复
在客户端是看不到具体错误的
最好到IIS内运行网站,查看具体错误原因
wuyq11 2010-08-01
  • 打赏
  • 举报
回复
修改 <customErrors mode="Off"/>
看看具体错误
aplesen 2010-08-01
  • 打赏
  • 举报
回复
怎么没人来救我啊?
周煜皓 2010-08-01
  • 打赏
  • 举报
回复
权限问题。。确保空间支持你这个版本的.NET 。。

62,046

社区成员

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

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

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

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