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.) 2 1781
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.)
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kingdom |
last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off
- type B I have 12 off etc.
I'm using
Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM
Parts_Table")
...
|
by: Steven T. Hatton |
last post by:
In the past there have been lengthy discussiions regarding the role of
header files in C++. People have been very adamat about header files
serving as in interface to the implementation. I do...
|
by: teedilo |
last post by:
We have an application with a SQL Server 2000 back end that is fairly
database intensive -- lots of fairly frequent queries, inserts, updates
-- the gamut. The application does not make use of...
|
by: Patrick Kowalzick |
last post by:
Hello NG,
sorry to bother again, but I am a lit surprised that I got no answer on my
post (attached below).
So I refined the code a little bit :-).
If there is a typedefed class X inside a...
|
by: Sting |
last post by:
I had a working .net program
I've re-installed XP (defective harddisk).
and now i keep getting
BC30466: Namespace or type 'test' for the Imports 'test' cannot be found.
The assembly is called...
|
by: sorCrer |
last post by:
Hi All,
I have searched for this problem but unusually have had no luck!
I have an .vb file in the code directory with the following simplified
code in it:
Namespace MyTest
Public Class...
|
by: Martin Jørgensen |
last post by:
Hi,
I'm relatively new with C-programming and even though I've read about
pointers and arrays many times, it's a topic that is a little confusing
to me - at least at this moment:
----
1)...
|
by: pemo |
last post by:
As far as I understand it, a trap representation means something like -
an uninitialised automatic variable might /implicitly/ hold a bit-pattern
that, if read, *might* cause a 'trap' (I'm not...
|
by: SLIMSHIM |
last post by:
Hi,
I"m new to c# and .net. I wrote a small program to add rows to an access
table.
the program goes thru the motions but the data never gets there.
here is my code. I am intentionaly not using...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |