I'm trying to import a namespace in my web service, but it is not being recognized. The applicable code for my namespace exists in the App_Code directory of my web site.
Does anyone know how I can get the namespace to be recognized?
if you cannot reference the namespace, then something is missing:
1. the assembly is not referenced
2. the object you want to reference is does not have the proper exposure (public/private/protected/internal...)
3. the namespace is spelled incorrectly
if the code is in the App_Code directory then it's either 2 or 3. by default objects are private unless otherwise stated
so
[tt]class Foo[/tt] is the same as [tt]internal class Foo[/tt] (I might have my accessors mixed up)
the ctor accessor my also play a role in the exposure.
It's not 2 or 3 as this class is referenced numerous times elsewhere in the application. I suspect it's related to the fact that the classes that reside in App_Code don't get compiled to a dll that resides in the bin directory. I've never written a web service before so I'm not sure if that's the case, or what to do about it. I don't want to have to move the code out of the App_Code directory.
it's not a name resolution conflict is it?
where you have the same object name in 2 different namespaces? then you would need to either fully qualify, or alias one of the objects.
other than that i'm stumped. not sure what to do in this case.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.