I note that you are using DNN4.0, and did mention that it sometimes happens when using the starter templates. I do not know how close the two relate as I have not had too much of a chance to move to the DNN4 DEV ENV, but I would like to see your tutorial.
The solution to my problem in 3.2 was this:
NameSpace issues in the DAL..
The person coding the third party module did not use conventional or a standardized coding practice, and DNN 3.2 as well as DNN 4 are both seeming to be sticklers on this at least in the namespace. The original module was created for a DNN 3.0.x Portal, it had such namespace practices as not declaring a namespace at all such as:
Namespace WebDataTechnologies.DNN.Modules.AFIPending.x
where x is replaced with Data or Business depending on the namespace or control that you are using or it would use simple namespace names like Namespace SetupAFI, why the original coder did this? I have no idea. Probably found dotnetnuke, watched a tutorial or bought a book, slapped a module together and called it an application to sale to an unsuspecting buyer. What I did was to go back to the templates of dnnJungle and Codesmith and just regenerate everything that I would need for the DAL, used the original front end, and rewired/recoded the new back end and the proper event handlers using proper naming and dotnetnuke standards. Once I did this I tested each step of the way and there were no problem other than the occasional error that one might have when passing variables between the different parts of the DAL.
To satisfy my curiosity after I was done with the project and got it out to where it needed to be, I went back into the original code and just examined all of the namespaces, and some of the syntax. I then modified the namespaces and tweaked the DAL just a bit and the code worked fine, but I prefer something that meets standards.
Point of the matter is that while adefwebserver makes a good observation on file placement I have seen this in some cases where my SQLDataProvider Project gets shifted around when I said, "Go to your happy little home in the Providers directory", some of the problem still remains in the namespace syntax or actual module code itself. Without the correct namespace, I would imagine it would be difficult to pass a moduleId through the DAL to display the Module at all let alone manipulate it. Again this is my assumption, and I mean no harm I am only attempting to make my suggestion as to what might help some out and explaining what worked in my situation.
I will attempt some further investigation and post my findings, but I am betting on the namespaces. (Being that before I touched the module it didnt connect to the SQL Server by design it just retrieved info and emailed to the client to be evaluated and be entered in to the the user DB at a later date by hand)
Michael
It's a little known fact that 80% of the world's millionaires do not work for someone else... The other 20% have to be the secretaries that work for Microsoft...