I'm building a module following the Mitchell Sellers Module Programming book and have noticed a few problems with my environment. Browsing through the forums it seems a few others may have had similar problems. I would like to place my observations in the public domain to ask if I have a general setup problem and how I can rectify it. I don't believe this can be the correct way to develop modules.
1) I had lots of problems resolving symbols which were clearly a result of the project not finding the dlls in the root directory. This must be related to the setting up the IIS Server on the project configuration Web tab. This should be pointing to the root of the website to find the /bin directory with all the dlls in. However when I offered http://localhost/MyWebSite it suggested configuring it as a virtual directory. This failed since it was already in use. To resolve this I deleted my root url from IIS, allow VS2008 insert http://localhost/MyWebSite as the project url. Then go to IIS remove the virtual directory that VS created and return my Website root otherwise the url points to the project and not the root where the dlls reside.
Of course moving in and out of VS gives you problems so you have to tear down and set up the IIS for the root each time. (The local IIS URL http://localhost/MyWebSite specified for the Web project GuestbookCS has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?) Clearly something is wrong.
2) Loading the Module on the website from the manifest (Create module using manifest) worked OK but installing on a page gave me the error: Error. Guestbook CS is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Code\MyWebsite\desktopmodules\guestbookcs\web.config line 19 -> System.configurati sException: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Looking at the IIS only showed the root directory with the default application pool and no others. After trawling the forums I followed one suggestion and renamed the web.config in the project (not the website root) directory. I suspect this will require re-instating at a later time.
I guess I'd like to know if anyone else out there is experiencing the same difficulties with the VS2008 setup for DNN Module development and how should I resolve the project url rather than this process of deleting and re-creating the main root virtual directory.
Secondly, if the web.config is needed, how do I get round the page installation problems?
I'm guessing the two problems are related.
Thanks all in advance.