PDA

View Full Version : مشکل آبجکت word در asp.net



sqlcommandbuilder
پنج شنبه 21 شهریور 1387, 01:45 صبح
با سلام.
من reference ورد رو در فرم asp اضافه کرده و با اون application های ورد رو تولید کردم .
اما وقتی از لوکال به دومین منتقل کردم این پیغام رو میده:


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 25: <compilation debug="false" strict="false" explicit="true">Line 26: <assemblies>Line 27: <add assembly="Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/></assemblies></compilation>Line 28: <pages>Line 29: <namespaces>

sqlcommandbuilder
شنبه 23 شهریور 1387, 10:29 صبح
dll های مربوط به word رو تو پوشه bin کپی کردم . متن error عوض شد:



Server Error in '/' Application.

Cannot create ActiveX component.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Cannot create ActiveX component.

Source Error:

Line 4: Dim oword As Microsoft.Office.Interop.Word.ApplicationLine 5: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadLine 6: oword = CreateObject("Word.Application")Line 7: oword.Documents.Add.Paragraphs.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment .wdAlignParagraphRightLine 8: oword.Selection.TypeText("نام مراجعه کننده")
Source File: C:\Inetpub\vhosts\samenlab.com\httpdocs\Default.as px.vb Line: 6

Stack Trace:

[Exception: Cannot create ActiveX component.] Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String ServerName) +200 _Default.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\samenlab.com\httpdocs\Default.as px.vb:6 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

anubis_ir
شنبه 23 شهریور 1387, 14:53 عصر
كامپوننت‌هاي ورد از نوع كامپوننت‌هاي COM هستند كه بايد رجيستر شوند روي سرور درغيراينصورت كار نمي‌كنند.
اگر سرور متعلق به خودتون است ساده‌ترين كار اين است كه يك آفيس نصب كنيد (تا تمام dependency هاي مربوطه هم نصب شود).
اگر متعلق به خودتون نيست مشكل خواهيد داشت... (مگر اينكه سرور دار با شما كنار بيايد)

sqlcommandbuilder
یک شنبه 24 شهریور 1387, 14:51 عصر
نیاز به ددیکیت سرور هست که هزینش بالاست.
راه حل رو کلا عوض کردم!