
File Not Found Exception
Publicado por Alfredo (35 intervenciones) el 25/01/2008 22:23:48
Hola, tendo una aplicación en VS 2005, en la misma a traves de la opción de añadir referencia he adicionado una libreria (.dll) que esta hecha en VS 2003, el código es el siguiente
Imports COBE.LogicaNegocio.lnContratosOc
Imports AJAXEnabledWebApplication1.Class1
Partial Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
sCargarCatalogos()
End If
End Sub
Protected Sub sCargarCatalogos()
Dim lnClass As New AJAXEnabledWebApplication1.Class1
Dim lnContratosOC As New COBE.LogicaNegocio.lnContratosOc()
Dim ds_area As New DataSet
ds_area = lnContratosOC.fListarArea()
lnClass.CargarDropDownList(Me.ddl_area, ds_area, 0, "Descripcion", "Codigo", "")
Me.ddl_area.Items.Insert(0, New ListItem("", Nothing))
Me.ddl_area.SelectedIndex = 0
End Sub
End Class
Al compilar no me da error, pero al ejecutar me sale este error:
System.IO.FileNotFoundException was unhandled by user code
Message="Could not load file or assembly 'COBE.REGLASNEGOCIO, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. El sistema no puede hallar el archivo especificado."
Source="COBE.LogicaNegocio"
StackTrace:
at COBE.LogicaNegocio.lnContratosOc..ctor()
at AJAXEnabledWebApplication1.WebForm1.sCargarCatalogos() in C:Documents and SettingsalfsanchezMis documentosVisual Studio 2005ProjectsAJAXEnabledWebApplication1AJAXEnabledWebApplication1WebForm1.aspx.vb:line 13
at AJAXEnabledWebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in C:Documents and SettingsalfsanchezMis documentosVisual Studio 2005ProjectsAJAXEnabledWebApplication1AJAXEnabledWebApplication1WebForm1.aspx.vb:line 8
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Imports COBE.LogicaNegocio.lnContratosOc
Imports AJAXEnabledWebApplication1.Class1
Partial Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
sCargarCatalogos()
End If
End Sub
Protected Sub sCargarCatalogos()
Dim lnClass As New AJAXEnabledWebApplication1.Class1
Dim lnContratosOC As New COBE.LogicaNegocio.lnContratosOc()
Dim ds_area As New DataSet
ds_area = lnContratosOC.fListarArea()
lnClass.CargarDropDownList(Me.ddl_area, ds_area, 0, "Descripcion", "Codigo", "")
Me.ddl_area.Items.Insert(0, New ListItem("", Nothing))
Me.ddl_area.SelectedIndex = 0
End Sub
End Class
Al compilar no me da error, pero al ejecutar me sale este error:
System.IO.FileNotFoundException was unhandled by user code
Message="Could not load file or assembly 'COBE.REGLASNEGOCIO, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. El sistema no puede hallar el archivo especificado."
Source="COBE.LogicaNegocio"
StackTrace:
at COBE.LogicaNegocio.lnContratosOc..ctor()
at AJAXEnabledWebApplication1.WebForm1.sCargarCatalogos() in C:Documents and SettingsalfsanchezMis documentosVisual Studio 2005ProjectsAJAXEnabledWebApplication1AJAXEnabledWebApplication1WebForm1.aspx.vb:line 13
at AJAXEnabledWebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in C:Documents and SettingsalfsanchezMis documentosVisual Studio 2005ProjectsAJAXEnabledWebApplication1AJAXEnabledWebApplication1WebForm1.aspx.vb:line 8
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Valora esta pregunta


0