I have a class library with various namespaces created using VB.NET.
Example Class:
Namespace XYZ
Public NotInheritable Class Class1
Shared Function One() As List(Of String)
End Function
Shared Sub Two()
End Sub
End Class
End Namespace
There are several of these inside of a ClassLibrary.dll that is referenced in the ASP.NET Web Forms Web Site.
When I use this on the development machine, it works fine. However, when I try to call a page on the production machine that uses any code referenced it doesn't work.
My apologies, I don't have exact error messages, but they are basically:
I have done some searching and haven't had any luck.
This code works when I test it using desktop applications and the aspx page running on the development machine's IIS.
I have tried moving the code to a module which didn't work. I have tried creating a new class file directly in the site and re-writing the code which didn't work.
When I place the code directly in the aspx.vb page, it doesn't generate the Compilation Error, but the DropDownLists still do not populate.
Example Code to Populate DropDownLists:
ddl_One.DataSource = Class1.GetEmployeeNames()
ddl_One.DataBind()
Edit (more information):
Microsoft (R) Visual Basic Compiler version 11.0.50938.18408 Copyright (c) Microsoft Corporation. All rights reserved.
error BC30002: Type 'CapabilitiesForm' is not defined.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
The problem was with an IIS setting related to Application Pool.
I apologize I do not have a detailed solution, but it was through troubleshooting another issue that this one was resolved.