Friday, September 18, 2009

Dynamic data website error

If you get this error when setting up a dynamic website there are two things it could be:

"There are no accessible tables. Make sure that at least one data model is registered in Global.asax and scaffolding is enabled or implement custom pages"

Firstly check  the Global.ascx.cs page to make sure that you've updated YourDataContext to whatever the name of your datacontext is.

Secondly make sure ScaffoldAllTable is set to True.

model.RegisterContext(typeof(YourDataContext), new ContextConfiguration() { ScaffoldAllTables = true });

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.