Last post Jun 04, 2008 08:12 AM by dannyg_uk
Jun 01, 2008 10:19 PM|RogerJenn|LINK
After adding a subfolder, Order_Details for example, to the CustomPages folder, adding List.aspx and its subfiles immediately creates a bunch of name conflicts with the 5/23/08 bits. This doesn't occur for the same process with file-system Web Sites.
This makes it evident why the Onyx sample projects only use file-system Web Sites.
What's the schedule for fixing this and is there a temporary workaround?
Jun 01, 2008 11:04 PM|sjnaughton|LINK
Hi Roger I think its just a namespace issue if you change the class name of the page it should work OK.
Dynamic Data WebApplicationProject
Jun 01, 2008 11:09 PM|davidebb|LINK
I think what you're seeing is actually the expected behavior if you are just copying List.aspx from PageTemplates into the custom page folder. The problem is that in a Web App, everything gets compiled as one DLL, and bad things happen if you end up with
two classed with the same namespace and name. The fix is trivial: use a different namespace for the custom page. e.g. instead of WebApplication1, use WebApplication1.Order_Details as a namespace. You'll need to change this both in List.aspx (in the 'inherits'
attribute) and in List.aspx.cs (as the namespace).
Jun 01, 2008 11:11 PM|davidebb|LINK
Steve beat me to it! As he points out, you can also choose to change the class name instead of the namespace, which will work as well. One way or another, you need to avoid the full class name duplication.
Jun 02, 2008 02:34 PM|RogerJenn|LINK
David and Steve,
Thanks for the reply. It looked to me to be a namespace/classname issue, but wanted to make sure it wasn't cockpit error on my part before writing about it.
Thanks also for your frequent and detailed blog posts on ADO.NET Dynamic Data. The product is shaping up as a more-than-worthy replacement for Blinq (http://oakleafblog.blogspot.com/2006/06/generate-data-based-web-sites-with.html).
Jun 02, 2008 06:31 PM|RogerJenn|LINK
Eliminate Ambiguous Object References when Customizing ADO.NET Dynamic Data Pages in Web Apps post, which deals with this topic, is live.
Is a fix for this problem in the works?
Jun 02, 2008 08:09 PM|davidebb|LINK
Thanks for blogging the solution Roger!
Jun 03, 2008 04:27 PM|dannyg_uk|LINK
I am getting a "The resource cannot be found" error from a Web Site Project. I have added a Cutomers directory (which matches one of my data entities) to CustomPages and copied Details.aspx files from PageTemplates. The website works fine when I remove the
Customers directory from CustomPages. Anyone come across this before?
Jun 03, 2008 04:46 PM|sjnaughton|LINK
Hi Danny, are you running the latest version Visual Studio 2008 SP1 beta + 5/23 release see
here. I've just build a site based on Northwind in a DynamicData Web Applicaion no problems.
Dynamic Data 5-23 Release
Jun 03, 2008 04:59 PM|davidebb|LINK
Also, what's the URL you're going it when you get this error? Note that this seems unrelated to the issue discussed in this thread, so it would be best to start a separate thread to avoid confusion between the two.
Jun 04, 2008 07:47 AM|dannyg_uk|LINK
Steve, I am running the I have Visual Studio 2008 Service Pack 1 Beta installed, and then the 5-23a Refefresh (http://code.msdn.microsoft.com/dynamicdata/Release/ProjectReleases.aspx?ReleaseId=1039).
David, when I run the website the url is
which results in the "resource cannot be found" error.
Should I start a new thread for this just thought it could be related to the other problem?
Jun 04, 2008 07:58 AM|marcind|LINK
The fact that you are not seeing anything at the address you provided is by design (there's a web.config file in the DynamicData folder that is responsible for the 404).
Instead, you should go to http://localhost:1143/DynamicWebsite/Customers/Details.aspx (assuming you have not modified the routing rules in global.asax).
Jun 04, 2008 08:12 AM|dannyg_uk|LINK