Created a new MVC project in Visual Studio and added a StartPage.cs in Models.
It inherits from PageData and has the ContentType attribute set.
It's not available when creating a new page though and it's not added to the database.
What could I have missed?
After 40 minutes without having done anything, page types have magically appeared when creating new pages.
Is it possible there's something delaying the writing to the database?
If you remember we had the same issue on dev course. It is reported as a bug if i remember correctly. Looks like there is some problem with virtual directory and scanning for binaries when using iis express.
If this is happening again you can try to remove the virtual directory path in iis express applicationhost.config. It is located in My Documents/IISExpress.
You could also change the portnumber for the application in your project-file. This is done by chosing properties on your project-file inside VS.
I didn't think it was the same problem, I think we thought it was because we were using VS Express.
But thanks for the tips! If it happens again I'll try them out.
I have the same issue. I have tried both tips from Eric but my page type is still not showing. Any other ideas how to fix this?
Try to remove the binaries and rebuild the project if you have tried the above... Also setup the project with ordinary IIS migh work much better then IIS Express even though I prefer IIS Express.