Invalid postback : Weather Channel script

Discussion in 'ASP.NET Starter Kits' started by tmurray, Feb 12, 2006.

  1. I'm new to asp.net and...... web development as a whole. I've managed to get the Personal Starter Kit workingand would like to add a Weather Channel script to display local weather. It works on the intial startup buts bombs when you try to login or logout. Error message below.

    Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

    Any help or suggestions would be appreciated.

    TomM
     
  2. Yes, I gave that a shot and it didn't work. The <pages enableEventValidation="true" />
    statement isn't called from either the webconfig or Default.aspx pages for the Personal Starter Kit.

    There is a line in the webconfig stating:




    <authentication mode="Forms"> <forms loginUrl="Default.aspx" protection="Validation" timeout="300" /> </authentication>


    As I understand it, Ineed the login formto validate the pagewhen someone tries to login so that certain albums are viewable by certain users. I just want the client-side Weather Channel script to notcause the pageto throwan error. This leads me to believe the solution lies in the ClientScriptManager.RegisterforEventValidation method. I'm just not sure how and where to put this piece of code so that I can register the Weather script.


    Thanks,


    Tom M
     
  3. Bruce

    Bruce DiscountASP.NET Staff

Share This Page