A couple errors that came up in the SharePoint 2010 Developer Training Kit

I’ve started to go through the SharePoint 2010 Developer Training Kit after setting up a development environment and I received a couple error messages while doing the Labs.

While trying to add a custom webpart to a webpart zone:

“Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.”

While attempting to debug a project:

“Could not load the Web.config configuration file. check the file for any malformed XML elements, and try again. The following error occurred: The given key was not present in the dictionary.”

Both of the errors were resolved by ensuring  the URL assigned to the Default zone for the Web Application’s Alternate Access Mappings matches the Site URL of the SharePoint project in Visual Studio 2010. Using one of the other zones (like Intranet) for the URL will not work. The Default Zone and the project’s Site URL need to match. Thanks to Steve!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: