PDA

View Full Version : Invalid postback : Weather Channel script


tmurray
02-12-2006, 03:31 AM
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

joelnet
02-13-2006, 08:48 AM
Have you disabled event validation to see if it works?


Joel Thoms

DiscountASP.NET
http://www.DiscountASP.NET

tmurray
02-14-2006, 01:33 AM
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

tmurray
02-16-2006, 04:41 AM
Thanks, that link gives me a couple of ideas to try. Also, I should have included the problem script in my original post.


<script src='http://voap.weather.com<WBR>/weather/oap/80027?template<WBR>=COLDH&amp;par=1017671576&amp;unit=0<WBR>&amp;key=cfa7578389028a5d6c00bb8c9<WBR>93f30a3' (http://voap.weather.com/weather/oap/80027?template=COLDH&amp;par=1017671576&amp;unit=0&amp;key=cfa 7578389028a5d6c00bb8c993f30a3')></script>



Tom M

bruce
02-16-2006, 12:48 PM
I did some research and it looks like this is an asp.net 2.0 issue.

see http://channel9.msdn.com/ShowPost.aspx?PostID=159495

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)