
02/10/2009, 10:33
|
| | Fecha de Ingreso: julio-2009
Mensajes: 8
Antigüedad: 15 años, 7 meses Puntos: 0 | |
No me es posible generar ActiveX Hola. Estoy haciendo una web que me envia un correo mediante outlook y me encuentro que me devuelve el servidor el erro siquiente
No se puede crear el componente ActiveX.
Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.
Detalles de la excepción: System.Exception: No se puede crear el componente ActiveX.
Error de código fuente:
Línea 73: lopd.arxiu = "C:\Inetpub\wwwroot\LOPD\manteniments\" & DataGrid1.Items.Item(fila).Cells(3).Text
Línea 74: lopd.correu = TextBox2.Text
Línea 75: lopd.Main()
Línea 76: Label6.Text = "Documentacio enviada a:" & TextBox2.Text & " en " & DropDownList1.SelectedValue
Línea 77: End Sub
Archivo de origen: c:\inetpub\wwwroot\LOPD\enviar.aspx.vb Línea: 75
Seguimiento de la pila:
[Exception: No se puede crear el componente ActiveX.]
Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String ServerName) +211
lopd.Module1.Main() +25
_Default.DataGrid1_SelectedIndexChanged(Object sender, EventArgs e) in c:\inetpub\wwwroot\LOPD\enviar.aspx.vb:75
System.Web.UI.WebControls.BaseDataList.OnSelectedI ndexChanged(EventArgs e) +8737850
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(O bject source, EventArgs e) +159
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.DataGridItem.OnBubbleEve nt(Object source, EventArgs e) +123
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String eventArgument) +135
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
codigo:
ub Main()
'[1. El primer paso es crear una aplicación de Outlook]
Dim oApp As Outlook.Application
'oApp = New Outlook.Application()
oApp = CreateObject("outlook.Application")
' Crear un nuevo elemento de correo.
'[2. Una vez realizado el punto 1, se procede a crear un correo electrónico]
Const R_ENVIO = 0
Dim oMsg As Outlook._MailItem
'oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg = oApp.CreateItem(R_ENVIO)
oMsg.Subject = "Tarinas Viladrich advocats: Manteniment expedient de Proteccio de dades"
'oMsg.Body = texte
oMsg.HTMLBody = texte
'Dim html As a
'html = AlternateView.CreateAlternateViewFromString(strBod yHTML, Nothing, "text/html")
oMsg.BodyFormat = Outlook.OlBodyFormat.olFormatHTML
'[3. Indicar la dirección del usuario a quien se le enviará el mensaje de correo]
oMsg.To = correu
'[4. Para agregar un dato adjunto, se sigue de este modo, indicando la ruta de acceso al archivo solicitado]
Dim sSource As String = arxiu
Dim sDisplayName As String = "Auditoria"
Dim sBodyLen As String = oMsg.Body.Length
Dim oAttachs As Outlook.Attachments = oMsg.Attachments
Dim oAttach As Outlook.Attachment
oAttach = oAttachs.Add(sSource, , sBodyLen + 1, sDisplayName)
oMsg.Send()
oApp = Nothing
oMsg = Nothing
oAttach = Nothing
oAttachs = Nothing
End Sub
En el servidor de prueba de mi VS2008 el programa funciona perfectamente pero a la hora de pasarlo al IIS6 que tengo me devuelve este error.
Muchas gracias de antemano |