Malformed web.config killing your ASP.NET-application or SharePoint (“Server Error in ‘/’ Application” or “Parser Error”)

Malformed web.config

Symptoms

Once you navigate to your site, you only get en error like this:

Server Error in ‘/’ Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Index was outside the bounds of the array.

The next few rows (source of the error) seem to vary wildly, but they’re something like this:

Parser Error

Line 3: <WebControls:XmlUrlDataSource runat=”server” AuthType=”None” HttpMethod=”GET”>
Line 4: <DataFileParameters>
Line 5: <WebPartPages:DataFormParameter Name=”RequestUrl” ParameterKey=”RequestUrl” PropertyName=”ParameterValues”/>
Line 6: </DataFileParameters>
Line 7: </WebControls:XmlUrlDataSource>

Continue reading

Visual Studio 2010 fails to show the design view of an aspx-page

SharePoint project properties

This post is about solving the issue with Visual Studio 2010 failing to show the design view of an .aspx-page. Luckily, it’s an easy and pretty classical fix.

Symptoms

While trying to view or edit an aspx-page in design mode in Visual Studio 2010, the window is just plain empty and there’s little you can do about it – selecting view markup or hitting F7 may not do anything and restarting the Visual Studio doesn’t help.

empty aspx page design view

Design view failing to open

Solution

The Design view requires connection to the SharePoint site where you’ll be deploying the solution (or rather, any site). Set the Site URL property in the project settings:

Continue reading