Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

  • SharePoint: SPList.HasView() extension method

    One quick posting. I wrote yesterday extension method for SharePoint that checks if view exists. I think it is far better for performance if I don’t live on try…catch to find out if view exists or not. Extension method that you have to put in static class is here.

  • Invalid postback or callback argument. Event validation is enabled using in configuration …

    I wrote web part that uses Repeater control to create some repeating blocks of output. Each of these blocks has Button control in it. When I ran web part under SharePoint I got the following error: 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. Here is the solution.

  • SharePoint: COMException 0x81020069

    A little mystery when updating publishing pages: page is checked out, some attributes are changed and now I want to update this page. All I get is error that even Google has never seen before: System.Runtime.InteropServices.COMException (0x81020069). As I got error message in my own language I try to translate it: Attributes of checked out and orphan regime document cannot be edited. To edit attributes you have to use special software for this type of file.

  • SharePoint: DCOM Error 10016

    I you get Access Denied errors in SharePoint then take a look at Event Viewer to see if there are some DCOM 10016 Event Errors in System log: The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool. If there is such error then follow the steps below to get this error fixed.

  • Running SharePoint on Windows 7

    I tried to put up SharePoint development environment on Windows 7 and guess what – I succeeded. I took smaller challenge and installed WSS 3.0 SP2. Of course, you can also install SharePoint Server instead of WSS. On my machine WSS 3.0 uses SQL Server 2008 Express edition as database. For MOSS 2007 you should have SQL Server 2008 Developer edition.

  • Why we should attack our own systems?

    Web page that is not attacked by security team or developers and testers before going to live can be considered as unsecure because nobody knows how it behaves under attacks. Unfortunately there are many web pages that are not secure and not event tested with security in mind. If some of these web pages happen to be a e-commerce sites then it is not hard to guess what kind of data attacker may find in this system about us. How can we be sure that our systems are protected against attacks?

  • SharePoint: The security validation for this page is invalid

    Another day, another lesson. This time I struggled with the following error: “The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.” This error occurs when you are on a custom form and try to save list item. I am sure that one can find many more scenarios where this error occurs. As usual, log contains error but not information.