By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

BC30466 again - what am I missing or doing wrong?

P: n/a
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.)
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
===========
"Phil Certain" <c9******@fastmail.co.uk> wrote in message
news:b2**************************@posting.google.c om... 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.)

Nov 19 '05 #2

P: n/a
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

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.