Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using class component in aspx

Status
Not open for further replies.

harmmeijer

Programmer
Mar 1, 2001
869
CN
What am I doing wrong????

1. Made a class library project.
code in the project looks like this:
Public Class clsauthors
' some real working code is here, tested it in an application project
End Class

2. In the solutions explorer it stays there as Classlibrary1 allthough I changed the assambly name and the Root namespace to Authors.
3. Compiled in in the bin directory of a pubs directory (4. Made the web.config file containing the following text:
<configuration>
<system.web>
<compilation>
<assemblies>
<add assembly=&quot;Authors.clsauthors&quot;/>
tried allso: <add assembly=&quot;Authors&quot;/>
tried allso: <add assembly=&quot;clsauthors&quot;/>
tried allso: <add assembly=&quot;Classlibrary1&quot;/>
</assemblies>
</compilation>
</system.web>
</configuration>
5. The start of the aspx page looks like this (allthough I never get to that part):
<%@ Import Namespace=&quot;Authors.clsauthors&quot; %>
tried: <%@ Import Namespace=&quot;Authors&quot; %>
tried: <%@ Import Namespace=&quot;clsauthors&quot; %>
tried: <%@ Import Namespace=&quot;ClassLibrary1&quot; %>

The error I get when opening the page is:
File or assembly name Authors.clsauthors, or one of its dependencies, was not found.

Source File: c:\inetpub\ Line: 5


So the error is allready there in the web.config.

How can I fix this, what am I doing wrong. All the examples use a class.vb file and the example projects in of .net make a shtload of files, I only want the 3 (web.config, authors.dll, authors.aspx).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top