Har komplierat en .vb fil och den hamnade där den skulle, men när jag skall köra .aspx filen så hittar den inte assemblyn. Någon som kan rada up vanliga fel om detta som man kan använda för att felsöka. Använde detta vid komplieringen
Detta är ett bokexemple och koden är som den är skriven i boken så enligt felmeddelandet så måste det ha något med sökvägen att göra.
Till .vb filen:
C:\Webbsidor\dot.net\books\aspnet3veckor\dag6\ovning02_02_CustomControl.vb
Till .dll filen:
C:\Webbsidor\dot.net\books\aspnet3veckor\bin\CustomControls.dll
Till .aspx filen:
C:\Webbsidor\dot.net\books\aspnet3veckor\dag6\ovning02_01_CustomControl.aspx
Felmeddelandet:
Server Error in '/dot.net' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: File or assembly name CustomControls, or one of its dependencies, was not found.
Source Error:
Line 1: <%@ Page Language="VB" Trace="True" Debug="True" %>
Line 2: <%@ Register TagPrefix="ACME" Namespace="MyCustomControls" Assembly="CustomControls" %>
Line 3: <script runat="server">
Line 4:
Source File: C:\Webbsidor\dot.net\books\aspnet3veckor\dag6\ovning02_01_CustomControl.aspx Line: 2
Assembly Load Trace: The following information can be helpful to determine why the assembly 'CustomControls' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = CustomControls
(Partial)
LOG: Appbase = file:///C:/Webbsidor/dot.net
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: CustomControls
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls/CustomControls.DLL.
Du har inte lagt din .dll fil i rätt bin mapp. Enligt loggen ovan letar den i \dot.net\bin där den ska ligga, din ligger i en undermapp till \dot.net testa att placera filen direkt i dot.net\bin och inte i C:\Webbsidor\dot.net\books\aspnet3veckor\bin\ eftersom dot.net troligtvis är din root katalog för applikationen.