Syntax error when I add ScriptManager to head-tag

Last post 03-09-2007 1:28 PM by invid. 11 replies.

Sort Posts:

  • Syntax error when I add ScriptManager to head-tag

    07-10-2006, 10:21 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    I have an existing web, and i want to add Atlas technology.

    I've changed the web.config so it looks like the web.config when you use the atlas template.

    But when ik add the Scriptmanager tag to the head-tag, I get a Syntax error on line 4 char 1 when I run my loginpage.

    I tried a little test project, and there it works fine.... (with masterpage functionality).

    But why do I get the Syntax Error message?

     

    Here the code of my masterpage:

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %>

    <!

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <

    html xmlns="http://www.w3.org/1999/xhtml" >

    <

    head id="Head" runat="server">

    <title></title>

    <link rel="stylesheet" type="text/css" href="StyleSheet.css" />

    <atlas:ScriptManager ID="scriptmanager" EnablePartialRendering="true" runat="Server" />

    </head>

    <body>

    <form id="form" runat="server">

    <atlas:UpdatePanel ID="UpdatePanel1" Mode="Conditional" runat="Server">

    <ContentTemplate>

    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

    </asp:contentplaceholder>

    </ContentTemplate>

    </atlas:UpdatePanel>

    <div id="Wrapper">

    <div id="HeaderWrapper">

    <div id="HeaderContent">

    <div id="HeaderLeft">

    <div id="Logo"><div id="Image"></div></div>

    </div>

    <div id="HeaderMiddle">

    <div id="HeaderMiddleCenter">

    <div id="HeaderMiddleInner">

    <asp:LoginView ID="LoginViewHeader" runat="server">

    <LoggedInTemplate>

    <asp:Label ID="LabelWelcome" runat="server" meta:resourcekey="LabelWelcome" /><asp:LoginName ID="LoginName" runat="server" meta:resourcekey="LoginName" />

    </LoggedInTemplate>

    </asp:LoginView>

    <asp:ValidationSummary id="ValidationSummaryHeader" runat="server" CssClass="ValidationSummary" ForeColor="" meta:resourcekey="ValidationSummaryHeader" />

    <div id="HeaderMiddleInnerDown">

    <asp:Label ID="LabelResultMessage" runat="server" meta:resourcekey="LabelResultMessage" />

    </div>

    </div>

    </div>

    </div>

    <div id="HeaderRight"></div>

    </div>

    </div>

    <div id="MainWrapper">

    <div id="SidebarWrapper">

    <div id="SidebarUserImage"></div>

    <div id="SidebarUser">

    <asp:LoginView ID="LoginViewMyData" runat="server">

    <AnonymousTemplate>

    <!-- empty -->

    <br /><br />

    </AnonymousTemplate>

    <LoggedInTemplate>

    <div class="title"><asp:Label ID="LabelMyData" runat="server" meta:resourcekey="LabelMyData" /></div>

    <ul>

    <li><asp:HyperLink ID="HyperLinkChangePassword" NavigateUrl="~/ChangePassword.aspx" runat="server" meta:resourcekey="HyperLinkChangePassword" /></li>

    <li><asp:HyperLink ID="HyperLinkEmailForwarding" NavigateUrl="~/ChangeEmailForwarding.aspx" runat="server" meta:resourcekey="HyperLinkEmailForwarding" /></li>

    </ul>

    </LoggedInTemplate>

    </asp:LoginView>

    </div>

    <div id="SidebarAdministratorImage"></div>

    <div id="SidebarAdministrator">

    <asp:LoginView ID="LoginViewManageUsers" runat="server">

    <AnonymousTemplate>

    <!-- empty -->

    </AnonymousTemplate>

    <RoleGroups>

    <asp:RoleGroup Roles="AdministratorRole">

    <ContentTemplate>

    <div class="title"><asp:Label ID="LabelManageUsers" runat="server" meta:resourcekey="LabelManageUsers"/></div>

    <ul>

    <li><asp:HyperLink ID="HyperLinkAddUser" NavigateUrl="~/Administrator/AddUser.aspx" runat="server" meta:resourcekey="HyperLinkAddUser" /></li>

    <li><asp:HyperLink ID="HyperLinkShowUsers" NavigateUrl="~/Administrator/ShowUsers.aspx" runat="server" meta:resourcekey="HyperLinkShowUsers" /></li>

    <li><asp:HyperLink ID="HyperLinkAddUserBatch" NavigateUrl="~/Administrator/AddUserBatch.aspx" runat="server" meta:resourcekey="HyperLinkAddUserBatch" /></li>

    <li><asp:HyperLink ID="HyperLinkDeleteUserBatch" NavigateUrl="~/Administrator/DeleteUserBatch.aspx" runat="server" meta:resourcekey="HyperLinkDeleteUserBatch" /></li>

    </ul>

    </ContentTemplate>

    </asp:RoleGroup>

    </RoleGroups>

    </asp:LoginView>

    </div>

    <div id="SidebarLoginstatus">

    <ul>

    <li><asp:LoginStatus id="LoginStatus" runat="server" meta:resourcekey="LoginStatus" /></li>

    </ul>

    </div>

    </div>

    <div id="ContentWrapper">

    <asp:contentplaceholder id="ContentPlaceHolderContent" runat="server" />

    </div>

    </div>

    <div id="FooterWrapper">

    <asp:Label ID="LabelFooter" runat="server" meta:resourcekey="LabelFooter" />

    </div>

    </div>

    </form>

    </body>

    </html>

    <!------------------------>

    And here the page im running:

    <!------------------------>

    <%@ Page Language="C#" MasterPageFile="~/MasterPages/Site.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="LoginPage" Culture="auto" meta:resourcekey="Page" UICulture="auto" %>

    <%@ mastertype virtualpath="~/MasterPages/Site.master" %>

    <

    asp:Content ID="ContentContent" ContentPlaceHolderID="ContentPlaceHolderContent" Runat="Server">

    <asp:Login ID="LoginUser" runat="server"

    DisplayRememberMe="False"

    OnAuthenticate="LoginUser_Authenticate"

    OnLoginError="LoginUser_LoginError" meta:resourcekey="LoginUser"

    />

    </

    asp:Content>
  • Update: Syntax error when I add ScriptManager to head-tag

    07-10-2006, 10:35 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    It seems to be a problem with my web.config.

    I use form authentication:

    <authentication mode="Forms">
    <
    forms
    loginUrl="Login.aspx"
    />
    </
    authentication>

    When I change this to Windows, I don't get the error... BUT i want to use Forms authentication....

  • Re: Update: Syntax error when I add ScriptManager to head-tag

    07-10-2006, 5:43 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    does it also occurs when you have a simple page without a master? if so, can you post a sample with that code?

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: Update: Syntax error when I add ScriptManager to head-tag

    07-11-2006, 4:29 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    I'm getting closer to the real problem (i think). I simplified the code (starting a new project).

    My master page:

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml" >
    <
    head id="Head1" runat="server">
    <title>MaterPage Atlas project</title>
    <atlas:ScriptManager ID="scriptmanager" EnablePartialRendering="true" runat="Server" />
    </
    head>
    <
    body>
    <form id="form1" runat="server">
    <div>
    <atlas:UpdatePanel ID="UpdatePanel1" Mode="Conditional" runat="Server">
    <ContentTemplate>
    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
    </asp:contentplaceholder>
    </ContentTemplate>
    </atlas:UpdatePanel>
    </div>
    </form>
    </
    body>
    </
    html>

    And Default2.aspx:

    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton>
    <asp:Login ID="Login1" runat="server">
    </asp:Login>
    </
    asp:Content>

    And I'm using the 'default' web.config (the .config that is created when you start a new atlas web project) with the following additions:

    <

    authentication mode="Forms">
    <
    forms loginUrl="Default2.aspx"/>
    </
    authentication>
    <
    authorization>
    <
    deny users="?" />
    </
    authorization>

    I get the syntax error (line 4 char 1). And I'm NOT getting the error if I delete the authorization part.

    So it seams the problem has something to do with authorization...

     

  • Re: Update: Syntax error when I add ScriptManager to head-tag

    07-11-2006, 4:34 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello again.

    hum...i'll try to replicate that here.

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Syntax error on atlas and authentication

    07-11-2006, 9:01 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    santosbj seems to have the same problem: http://forums.asp.net/thread/1337860.aspx

     

  • Re: Syntax error on atlas and authentication

    07-12-2006, 3:19 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    and another one with the same problem:

    twistzilla: http://forums.asp.net/thread/1324650.aspx

  • Re: Syntax error on atlas and authentication

    07-12-2006, 4:16 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    The problem in my test is solved...

    I installed Fiddler (http://www.fiddlertool.com/), looked at what Fiddler logs.

    http://localhost:1631/AtlasWebSite2/Default.aspx
    http://localhost:1631/AtlasWebSite2/Default2.aspx?ReturnUrl=%2fAtlasWebSite2%2fDefault.aspx
    http://localhost:1631/AtlasWebSite2/WebResource.axd?d=MkCOvc...
    http://localhost:1631/AtlasWebSite2/WebResource.axd?d=N224mhQ4...
    http://localhost:1631/AtlasWebSite2/WebResource.axd?d=bcQ6hvCNZhNN5...
    http://localhost:1631/AtlasWebSite2/atlasglob.axd

    Read the thread http://forums.asp.net/thread/1324650.aspx, there they talk about atlasglob.axd and WebResource.axd.

    Now my web.config looks like this:

    ...
          <authentication mode="Forms">
             <forms loginUrl="Default2.aspx"/>
          </authentication>
    ...
       <location path=".">
          <system.web>
             <authorization>
                <deny users="?" />
             </authorization>
          </system.web>
       </location>

       <location path="Default2.aspx">
          <system.web>
             <authorization>
                <allow users="*"/>
             </authorization>
          </system.web>
       </location>

       <location path="atlasglob.axd">
          <system.web>
             <authorization>
                <allow users="*"/>
             </authorization>
          </system.web>
       </location>

       <location path="WebResource.axd">
          <system.web>
             <authorization>
                <allow users="*"/>
             </authorization>
          </system.web>
       </location>
    ...


    And i'm NOT getting the syntax error anymore!!!

     
     
     
  • Re: Syntax error on atlas and authentication

    07-12-2006, 6:51 AM
    • Member
      55 point Member
    • twistzilla
    • Member since 04-24-2006, 9:49 AM
    • Posts 11

    Hi Denman,

     

    So what are you doing differently now that fixed it ? is it the case-sensitivity?

     

    ~Brett

  • Re: Syntax error on atlas and authentication

    07-12-2006, 8:18 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26
    twistzilla:

    Hi Denman,

    So what are you doing differently now that fixed it ? is it the case-sensitivity?

    ~Brett

    No, i've added the <location path="atlasglob.axd"> and <location path="WebResource.axd">-tags to my web.config.

    Using Fiddler, I did see the atlasglob.axd and WebRerouce.axd pages comming by, so I added them to my web.config and allowed all users to these files.

    Note that this is the solution to my test project (http://forums.asp.net/thread/1336861.aspx#1337686), and not the solution to my initial post (first post of this thread).

  • Re: Syntax error on atlas and authentication

    07-12-2006, 8:24 AM
    • Member
      71 point Member
    • denman
    • Member since 07-10-2006, 2:11 PM
    • Enschede, The Netherlands
    • Posts 26

    Sorry Twistzilla,

    Maybe it's the case-sensitivity. But I didn't look at the case-sensitivity, but just copied the names from the log Fiddler maked...

    And looked if all pages that are required for inlogging are available for unknown users.

  • Re: Syntax error on atlas and authentication

    03-09-2007, 1:28 PM
    • Member
      7 point Member
    • invid
    • Member since 12-07-2006, 4:18 PM
    • Posts 7

    I am not sure which of the topics devoted to this to post to, so I will post here -

    I have grabbed fiddler, and found the two files you mention, denman, as well as the ScriptResource.axd file - I have added these to my forms authentication locations, just as you have outlined etc - but I am still getting this error. Is anyone else in this same situation - and if so, has a solution surfaced yet?

    Thanks!
     

Page 1 of 1 (12 items)