Namespace Problem in ASP.NET

  • Thread starter Thread starter Jared Turley
  • Start date Start date
J

Jared Turley

I am currently having an issue with an ASP.NET page not finding the
class library located in the application's /bin directory. The page
recognizes the compiled .dll class when running on my development
machine (IIS6/WinXP Pro) but when uploading to the web host the simple
error message of "Type Not Defined" is returned.

I have since opened an incident with the web host support personnel
but they claim that all they have is the standard .NET Framework
install and that there are no other configurations in place. I had
them double-check the default local assembly cache directory is the
/bin directory, so I am not sure what else could be the problem.

Does anyone know what other dependencies exists to be able to use
custom developed namespaces in ASP.NET.

Any help would be greatly appreciated...

Jared
 
Some web hosts turn off the ability to have dll's in the bin directory, and
require that all code be in the .aspx pages.

Other then that, then other cause is that the DLL is not actually there.
Otherwise, the web app looks in the GAC and its own bin directory for dll's.
 
The file is in fact physical there, and according to the support
people they claim they haven't done anything different than the
default installation of the .NET Framework, which leads me to believe
that there are no restrictions upon using namespaces.

I am wondering if there are any directory/user permissions that are
causing the problem. Just a thought
 
Here's an idea...

Are you sure the Type Not Defined error is because it can't find YOUR
namespace/class?

Is it possible you are using a component (3rd party) on that page that is
not on the server?


Regards
Brian W
 
I am positive, the page works fine when it is executed on my
development machine. I have developed the classes myself for code
re-use across multiple pages so there is nothing to do with 3rd party
components.
 
No, that's not what I asked.
I am positive, the page works fine when it is executed on my
development machine.

Of course it worls on your development machine. But what I asked was. are
your sure the Type Not Defined error is because can't find *your* class?
Isn't it possible the error is bacause some other class can't be found?

I have developed the classes myself for code
re-use across multiple pages so there is nothing to do with 3rd party
components.

Well, I don't know that from your original post, do I? An just because it it
*you class* doesn't mean you didn't use a 3rd party component, ho do I know?

Does the server work with a bare-bones web app?

Have you created a new WebApp with nothing else and copy it to the server,
ie. put the .dll in the bin directory and .aspx oin the root. Obviously if
you get the same error it is the servers problem, if not then it's in your
code/configuration.



Regards
Brian W
 
Okay, no need for the arrogance...so if there was a problem with it
not finding the class that is contained in the namespace then it would
fail to execute on my machine, that is what I meant. However that is
not the case, the class name in which I am trying to use is
'NCSchedule' in which the actual error message is "Type 'NCSchedule'
Not Defined"...I didn't feel the need to go into that much detail in
previous threads.

Additionally I backed up to make things more simple and used the old
'HelloWorld' tactic and embedded that such logic into a class library
with the same results.

And yes the server is serving up other web applications, it is
maintained by a hosting company. I have had other experience using
the same type of coding practice on other web hosts with no such
problems, which is why I don't think there is anything wrong with my
code.
 
Back
Top