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

【求助】asp.net发布问题,坐等高手急急。
机器情况
xp iis5.1 .netframework2.0.网站里面用了母版页。发布过后,在iis里面浏览,提示报错。请高手指点
-------------------------------------------------------
-----------------------------错误如下,我菜鸟,请高手尽量写详细点---------------------------------------------



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

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0030: Cannot convert type 'ASP.page_master' to 'System.Web.UI.Page'

Source Error:



Line 113:
Line 114: public page_master() {
Line 115: ((Page)(this)).AppRelativeVirtualPath = "~/Page.master";
Line 116: if ((global::ASP.page_master.@__initialized == false)) {
Line 117: global::ASP.page_master.@__stringResource = this.ReadStringResource();


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\fc7428e7\71ca932a\App_Web_page.master.cdcab7d2.vnhjrzhq.0.cs Line: 115



Compiler Warning Messages:
Warning: CS0108: 'ASP.page_master.Profile' hides inherited member 'Page.Profile'. Use the new keyword if hiding was intended.
Source Error:

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\fc7428e7\71ca932a\App_Web_page.master.cdcab7d2.vnhjrzhq.0.cs

Line 121: }
Line 122:
Line 123: protected System.Web.Profile.DefaultProfile Profile {
Line 124: get {
Line 125: return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));


Warning: CS0108: 'ASP.page_master.ApplicationInstance' hides inherited member 'Page.ApplicationInstance'. Use the new keyword if hiding was intended.
Source Error:

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\fc7428e7\71ca932a\App_Web_page.master.cdcab7d2.vnhjrzhq.0.cs

Line 127: }
Line 128:
Line 129: protected System.Web.HttpApplication ApplicationInstance {
Line 130: get {
Line 131: return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));


------解决方案--------------------
Cannot convert type 'ASP.page_master' to 'System.Web.UI.Page'

代码有问题或是.NET Framework版本问题,错误提示是无法将母版页转换成Page,就是说你的这个MasterPage页不是从Page类继承的。

不知道你的这个程序是哪个版本下的?