Accessing custom namespaces from IWebMethods

Mar 2, 2009 at 3:56 PM
First, let me thank you very much for your time.

I am using dnn 4.9.1.  In my App_Code folder I have an IWeb folder with all the appropriate files.  Also in the App_Code folder, and at the same level as IWeb, I have other folders that each contain an Info.vb file along with its associated Controller.vb file.

Pictorially it looks like this:

Additionally, the classes OmsAccountInfo and OmsAccountController are in a namespace of OMS.Accounts.  From my DesktopModules\OmsAccounts folder I am successfully importing the namespace OMS.Accounts and my controls are working perfectly.  However, when I load the IOmsWebServices.vb file, the namespace OMS is not found!?

In other words, all I want to do is from the IOmsWebServices.vb file access my OMS.Accounts namespace so I can use my controller and info classes.

I am not certain if I have a folder layout problem, a namespace problem or some other problem.

Again, thank you so very much for your time.

Michael Carr
Mar 2, 2009 at 4:06 PM
OmsAccounts directory would have to be "under" the IWeb directory to be availiable. With Dynamic Complimation one folder in App_Code is not gurranteed to see classes in another App_Code folder because the contens may not be "compiled in time".

So the design of IWeb is that you are suppose to put your additinal IWeb methods in or under the IWeb directory.
Mar 3, 2009 at 9:31 PM
That solved the problem.  Thank you so very much.
Be well.