BC30466 again - what am I missing or doing wrong?

P

Phil Certain

Hi,

Relative newbie to .Net but experienced with classic ASP. I am trying
to create a simple business object to contain commonly used functions.
This is what I have done:

1 - Created a simple vb file containing:

Imports System.Data.SqlClient
Imports System.Web.HttpUtility

Namespace MyComponents
Public Class HandleErrors
Public Function HandleSqlError(ByVal objException As
SqlException)

' Simple error handling function

End Function
End Class
End Namespace


2 - Compiled the 'class' using the command line:

vbc /t:library /r:system.web.dll /r:system.data.dll mylib.vb

It compiles without errors.

3 - Moved the resulting dll (mylib.dll) into the /bin directory of my
web app.

4 - Created /bin as an application in IIS5

5 - Added Everyone/Full permissions (temporarily) to the dll to ensure
that there are no problems due to permissions.


When trying to run the application through a browser I get the error
message:

Compiler Error Message: BC30466: Namespace or type 'myComponents' for
the Imports 'myComponents' cannot be found.

Source Error:

Line 14: Imports Microsoft.VisualBasic
Line 15:
Line 16: Imports myComponents
Line 17:
Line 18:


SUbsequently I've added the following to web.config, but to no avail:

<compilation debug="true" >
<assemblies>
<!--Tell ASP.NET to load all assemblies from /bin -->
<add assembly="*"/>
</assemblies>
</compilation>


At this point I'm not even calling or referring to the function
contained in the myLib.dll, but the error persists. I've also
replicated the problem using a 'business object' tutorial to try and
eliminate my code from the equation, so I am thinking that this is
conguration or process related rather than code related.

I've found many similar problems reported in the Newsgroups but no
real definative answers.

So any help or pointers would be appreciated before I go completely
bald! What am I not doing or what am I doing wrong? Does anyone have
the missing page of the manual?

(Running .Net 1.1 with SP1, Windows2000 Server SP4, all patches up to
date.)
 
J

Juan T. Llibre

re:
4 - Created /bin as an application in IIS5

That was a mistake.

You don't need the /bin directory
to be created as an Applpication.

It only needs to be created, as a *plain* directory,
if it doesn't exist after you create the Application
below which the /bin dorectory exists.

Go into IIS Manager and eliminate the application
which you created for the /bin directory.

Then, test your application and let us know
whether you still have problems.



Juan T. Llibre
ASP.NET MVP
===========
 
C

c9groups

Hi Juan,

Thanks for the quick reply. I removed the Application from /bin,
rebooted and then tested again, but unfortunately I get the same error
message. Any further ideas? What other info. can I supply?

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top