"master" attribute not recognized

  • Thread starter Thread starter nidii
  • Start date Start date
N

nidii

Hello,

I'm trying to define a default master page in web.config
for my web application lihe this:


<appSettings/>
<system.web>

<!--
Set the default master page
-->

<pages master="Templates/MasterAdvertising.master"/>

<!--
Set compilation debug="true" to insert debugging symbols
into the compiled page.
Because this affects performance, set this value to true
only during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration of the
security authentication
mode used by ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration of what
to do if/when an unhandled
error occurs during the execution of a request.
Specifically, it enables developers
to configure html error pages to be displayed in place of
a error stack trace.
-->
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<!--
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
-->
</customErrors>
</system.web>
</configuration>


At the compilation i get this error

D:\projects\cal\online\SRC\CalOnline2005UI\Templates\MasterHeader.master:
ASP.NET runtime error: Unrecognized attribute 'master'.
(D:\projects\cal\online\SRC\CalOnline2005UI\web.config line
17)D:\projects\cal\online\SRC\CalOnline2005UI\Templates\MasterHeader.master


Anybody knows how can be fixed?

Thanks,

Nidi
 
nidii said:
Hello,

I'm trying to define a default master page in web.config
for my web application lihe this:


<appSettings/>
<system.web>

<!--
Set the default master page
-->

<pages master="Templates/MasterAdvertising.master"/>

<!--
Set compilation debug="true" to insert debugging symbols
into the compiled page.
Because this affects performance, set this value to true
only during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration of the
security authentication
mode used by ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration of what
to do if/when an unhandled
error occurs during the execution of a request.
Specifically, it enables developers
to configure html error pages to be displayed in place of
a error stack trace.
-->
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<!--
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
-->
</customErrors>
</system.web>
</configuration>


At the compilation i get this error

D:\projects\cal\online\SRC\CalOnline2005UI\Templates\MasterHeader.master:
ASP.NET runtime error: Unrecognized attribute 'master'.
(D:\projects\cal\online\SRC\CalOnline2005UI\web.config line
17)D:\projects\cal\online\SRC\CalOnline2005UI\Templates\MasterHeader.master


Anybody knows how can be fixed?

Are you sure you're running the correct version of ASP.NET? "master" is an
ASP.NET 2.0 feature.

John Saunders
 
Back
Top