The file or folder name contains characters that are not permitted

This is a very misleading error message to get, especially when the cause and solution has NOTHING related to what the message is referring to.

I came across this error while attempting to deploy my site definition. I added a few things to my site definition, one of these was a aspx page referring to my master page.

The error:

<%@ Page language=”C#” MasterPageFile=~masterurl/custom.master” …../>

The fix:

<%@ Page language=”C#” MasterPageFile=”_catalogs/masterpage/custom.master” …../>

Done!

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: