Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

Last post 09-28-2008 2:19 AM by c.life. 7 replies.

Sort Posts:

  • Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

    05-25-2006, 9:19 AM
    • Member
      55 point Member
    • twistzilla
    • Member since 04-24-2006, 9:49 AM
    • Posts 11
    Hi There,

    I'm getting this annoying javascript error from the script manager ('syntax error on line 3') when I have a script manager on a master page and I'm using forms authentication.

    The error only occurs when you first load the website and you get redirected to the logon page. One you have logged in, or if you subsequently navigate to the logon page you do not get the error.

    I've been searching on this for days so any help or a work around would be appreciated.

    ~Brett

    ps: I have a zipped sample to illustrate the problem although I don't seem to be able to attach it here(no permission?). I can email it if anybody wants it - or can someone give me permission to upload?
  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

    05-25-2006, 3:12 PM
    • Member
      10 point Member
    • AndreasL
    • Member since 05-18-2006, 8:58 PM
    • Posts 2

    You have to exclude the following two .AXD files.

    Copy this into your Web.Config file

     

    <

    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>
  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

    05-26-2006, 5:18 AM
    • Member
      55 point Member
    • twistzilla
    • Member since 04-24-2006, 9:49 AM
    • Posts 11
    Thank you very much it works a treat!!Big Smile [:D]


    So did I miss some documentation or did you hit the same problem???

    ~Brett
  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

    06-26-2006, 5:27 AM
    • Member
      66 point Member
    • lambi_uk
    • Member since 09-22-2005, 12:12 PM
    • London
    • Posts 22

    Unfortunately I have added the correct lines in the web.config and I am still getting this error:

    Error: syntax error
    Source File: http://www.netploy.com/atlasglob.axd
    Line: 2
    Source Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">...

    I made sure the following is in the web.config:

     

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

     

    My masterpage is in the root of the website and contains the scriptmanager and the ATLAS pages accessed, in a subfolder in my ASP.NET 2.0 web project that is only set to accept authenticated users, would that make a difference?

     

     
      <location path="SecurePages">
        <system.web>
          <authorization>
            <allow roles="AuthenticatedUsers"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>

     Any help appreciated!

    Etienne

    Etienne
  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

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

    There are now (at least) 2 more posts with the same problem:

    denman:   http://forums.asp.net/thread/1336861.aspx
    santosbj: http://forums.asp.net/thread/1337860.aspx

    And we all hope to get a sollution.

  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

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

    Hi Etienne ( lambi_uk),

    I solved my problem (http://forums.asp.net/thread/1336861.aspx) by using Fiddler (http://www.fiddlertool.com/).

    Take a look at the and of my thread, maybe it can help you solve yours?

  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

    07-25-2006, 5:00 AM
    • Member
      66 point Member
    • lambi_uk
    • Member since 09-22-2005, 12:12 PM
    • London
    • Posts 22

    Hi Denman,

    thanks for your help.

    I have been able to solve my problem and I unfortunately cannot explain how! :(

    The problem was only occurring on our prod environment and not on our dev server for some reason. We published the code recently without changing anything but the version of ATLAS (the latest, June CTP) and everything worked, the JS error is completely gone.

    I am wondering if it was not a problem with the compilation/publish not beeing complete the last time we did it!

    Anyway... that one is definitely tricky but thanks very much for your replies! :)

    Etienne

    Etienne
  • Re: Scriptmager Bug : Forms Authentication + MasterPage = Javascript error

    09-28-2008, 2:19 AM
    • Member
      2 point Member
    • c.life
    • Member since 08-24-2006, 7:37 AM
    • Posts 4

    haha。Big Smile

    i make this mistake.

     

Page 1 of 1 (8 items)