WSS+SP2 + .NET 2.0 + Unghosted Page --> Problem!?

UPDATE: This issue is confirmed by Microsoft. See this weblog entry for more information.

I have WS SP2 + .Net 2.0 framework, with WSS running on .Net 2.0. Everything works fine. Until I have a unghosted page... when I try to add a web part using the web interface I get the following exception:

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.

I have the enableEventValidation set to false, as configured using the command:

stsadm.exe –o upgrade –forceupgrade –url http://URLOftheVirtualServer

I tried to add this setting to other web.config's and to the machine.config, but to no avail.

Seems like the SharePoint safe mode parser (executed on unghosted apsx pages) is behaving different from the normal ASP.NET page rendere.

When I modify the pages using FrontPage there is no problem.

Any ideas? I would hate to go back to the 1.1 FrameWork, because now I can write my web parts using SonOfSmartPart and the full functionality of the ASP.NET 2.0 framework.

I know I shouldn't unghost pages, but I'm doing a lot of Data View web parts.

[I'm cross-posting between my weblog (http://weblogs.asp.net/soever) and the sharepointdisussions group @ yahoo]

2 Comments

  • Same problem here with SPS and WSS SP2, .Net framework 2.0 on the server.



    I cannot add web parts to a page that has been modified using FP.



    Please Let me know about any development in the story!



    Thanks



    Peter

    pjakab using hotmail.com

  • we had same error now struck with smartpart v1.3... : (

Comments have been disabled for this content.