发布.aspx页面后出现Web.config错误 [英] Web.config error after I publish .aspx page

查看:182
本文介绍了发布.aspx页面后出现Web.config错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2008中创建了一个.rdl。



我必须使用VS 2013来创建和发布我的.aspx。



我能够成功清理和构建我的解决方案。没有错误。



当我在将其发布到我的内部网站的网址后尝试打开.aspx时,我得到以下内容:



引用:

'/'应用程序中的服务器错误。

- -------------------------------------------------- -----------------------------



运行时错误

描述:服务器上发生应用程序错误。此应用程序的当前自定义错误设置可防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以由运行在本地服务器计算机上的浏览器查看。



详细信息:要在远程计算机上查看此特定错误消息的详细信息,请创建< customerrors>位于当前Web应用程序根目录中的web.config配置文件中的标记。这< customerrors>然后,tag应将其mode属性设置为Off。





<! - Web.Config配置文件 - - >



< configuration>

< system.web>

< customerrors mode = 关闭>









注意:当前错误通过修改应用程序的< customerrors>的defaultRedirect属性,您看到的页面可以被自定义错误页面替换。配置标记指向自定义错误页面URL。





<! - Web.Config配置文件 - > < br $> b $ b

< configuration>

< system.web>

< customerrors mode =RemoteOnlydefaultredirect =mycustompage.htm>









此网站中有超过150个其他文件和页面以相同的方式发布。



我已经尝试了我在搜索Google时找到的所有解决方案,除了更改web应用程序根目录中的web.config文件,因为有使用此现有web.config文件正确显示的SEVERAL其他页面。



有没有人有任何文件其他解决方案我可以尝试解决此错误吗?



我可以通过报表管理器查看此文件 - 这只是最后一步是虚幻的。



我尝试过:



除了上面详述的那个,我尝试过搜索谷歌的所有解决方案。

解决方案

an0ther1,



我会尝试一下,看看是否会有所帮助。



我检查了服务器日志,发现了一个httpParseException警告:





无法加载类型'MyFolderName.MySubFolderName.MyNewReportName'。在System.Web.UI.UI.TemplateParser.Parse()的System.Web.UI.TemplateParser.ParseFile(String physicalPath,VirtualPath virtualPath)上的System.Web.UI.TemplateParser.ParseString(String text,VirtualPath virtualPath,Encoding fileEncoding)中位于System.Web.Compilation.Build上的System.Web.Compilation.Build上,System.Web.Compilation.Builation上的System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()的System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()位于System.Web.Compilation.Build上的System.Web.Compilation.Build上的System.Web.Compilation.BuildProvidersCompiler.Per System.Web.Compilation.BuildManager上的System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile,Boolean throwIfNotFound,Boolean ensureIsUpToDate)中的System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) .GetVPathBuildResultWithNoAssert(HttpContext context,VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Bo在System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath上的System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath,HttpContext context,Boolean allowCrossApp,Boolean throwIfNotFound)中的olean allowBuildInPrecompile,Boolean throwIfNotFound,Boolean ensureIsUpToDate(VirtualPath virtualPath,Type requiredBaseType,HttpContext) System,Web上的System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()的System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext上下文,String requestType,VirtualPath virtualPath,String physicalPath)上的context,Boolean allowCrossApp) .Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&已完成异步)



无法加载类型'MyFolderName.MySubFolder.MyReportName'。 System.Web.UI.TemplateParser.ParseStringInternal(String text,Encoding fileEncoding)System.Web.UI.TemplateParser.ParseString(String text,VirtualPath virtualPath,Encoding fileEncoding

I created a .rdl in VS 2008.

I had to use VS 2013 to create and publish my .aspx.

I was able to successfully Clean and BUILD my solution. There were no errors.

When I try to open the .aspx after I publish it to my internal web site's url, I get the below:

Quote:

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">




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">




There are over 150 other files and pages within this site that were published this same way.

I've tried every solution I've found from searching Google except changing the web.config file in the web app's root directory because there are SEVERAL other pages that are displaying correctly using this existing web.config file.

Does anyone have any other solutions I can try to resolve this error?

I can view this file via the Report Manager - it's just this last step that is illusive.

What I have tried:

I have tried every solution I found searching Google except the one detailed above.

解决方案

an0ther1,

I will try that and see if that sheds some light.

I checked the server logs and found an httpParseException warning:


Could not load type 'MyFolderName.MySubFolderName.MyNewReportName'. at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Could not load type 'MyFolderName.MySubFolder.MyReportName'. at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding


这篇关于发布.aspx页面后出现Web.config错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆