.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

System.Runtime.InteropServices.COMException (0x800A141F): Word was unable to read this document. It

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net
 

Hi,

I am using the Interop.word.dll in my project to generate word reports. Reports are getting with out any exception if am using 2003 ms word. If i am using 2007 word iam getting the error as

 

System.Runtime.InteropServices.COMException (0x800A141F): Word was unable to read this document.  It may be corrupt

 

Please help to get reports work well in word 2007 also.

 

Regards,

Satish




View Complete Post


More Related Resource Links

System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot open or save any mo

  

Hello good people, 

I have this beast as an error. Did my research and found some posts here as well but did not do any good for me. 

Here is what I did. I had an error regarding issue rights with COM objects so I gave access rights under component services for Microsoft Excel application now I am getting this error. 

Here is some information regarding this

1. Gave rights to ASPNET and network service to my web app directory to try to fix this error. 

2. The exact same process works on my Windows 2003 server and my Windows 7 development machine. I am trying to get this going on a different windows 2003 machine that is outside of our domain.

3. Developing on windows 7 64 bit with office 2010 installed. Also excel 2010 is installed on my Web server

4. Here is the code that is causing the error: The last line is causing the error.:

GC.Collect();
            MyXl = new Microsoft.Office.Interop.Excel.Application();
            MyXl.Visible = false;
            
            MyWb = (Microsoft.Office.Interop.Excel._Workbook)(MyXl.Workbooks.Add(Missing.Value));
            int test = 0; 
            MySheet = (Microsoft.Office.Interop.Excel._Worksheet)MyXl.ActiveSheet;
            if (reader.HasRows)
            {
                int InRow = 2; 
                for (int i = 0; i < Nu

System.Runtime.InteropServices.COMException with Event Handlers

  
hi,           i have written an ItemDeleting Event handler for a document library which holds images. the itemdeleting eventhandler works fine and displays the  errormessage on sharepoint error page when properties.cancel=true and properties.ErrorMessage="This Image is still being used in Announcements. Cannot Delete. ". this works fine when i delete from the doclibrary itself. when i delete the images in the document library from the ImageManger Tool of RadEditor it throws the com exception as follows instead of the sharepoint error page Server Error in '/' Application. -------------------------------------------------------------------------------- This Image is still being used in Announcements. Cannot Delete. 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.Runtime.InteropServices.COMException: This Image is still being used in Announcements. Cannot Delete. can anyone suggest, how to reslove this issue.? i have the screenshots,which would better explain but i dont know how to paste images into this forum? kindly let me know how to upload images to this forums also. thank you all

SSIS package fails giving "System.Runtime.InteropServices.COMException" exception

  

I am trying to execute the package in SQL Server 2008 and i am getting this error.

Message

Executed as user: sql\SYSTEM. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    

Started:  11:07:09 AM  Error: 2010-09-20 11:07:10.95     Code: 0x00000000     Source: Transform Data Task  undefined      

Description: System.Runtime.InteropServices.COMException (0x80040428): Package failed because Step 'DTSStep_DTSDataPumpTask_1' failed.     at DTS.PackageClass.Execute()     at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteThread()  End Error  DTExec: 

The package execution returned DTSER_FAILURE (1).  Started:  11:07:09 AM  Finished: 11:07:10 AM  Elapsed:  1.094 seconds.  The package execution failed.  The step failed.

 

Do any one have a clue

 


A first chance exception of type 'System.Runtime.InteropServices.COMException'

  

After calling a very simple WCF Service I bind the result an Observable Collection of Countries to WPF ComboBox, in second ComboBox of cities I displayed the filtered cities based on the selected country. It works fine the first time but when I select another country it takes lots of time to display, the Visual Studio 2010 output displays this like 50 times:

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

Intereting to point out that it only happens if I try to open the ComboBox and not if if navigate through code doing something like SelectedIndex=2 . It does not happen as well if instead of the ComboBox I use a ListBox or TreeView.

Some extra details.... the real exception detail is:

An event was unable to invoke any of the subscribers (Exception from HRESULT: 0x80040201)

Please help with this bug....


ReportServicesConfigUI.WMIProvider.WMIProviderException: System.Runtime.InteropServices.COMException

  

Hi there!

I installed the Sql Reporting Services under Vista Business.

When i run de configuration tool, i have to select yhe machine name and instance name... then when i press connect this exception is thrown

 

ReportServicesConfigUI.WMIProvider.WMIProviderException: A WMI error has occurred and no additional error information is available. ---> System.Runtime.InteropServices.COMException (0x8000000A)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)
   at ReportServicesConfigUI.WMIProvider.RSInstance.RefreshServerStatus()
   --- End of inner exception stack trace ---
   at ReportServicesConfigUI.WMIProvider.RSInstance.RefreshServerStatus()
   at ReportServicesConfigUI.WMIProvider.RSInstance.get_DelayLoadConfiguration()
   at ReportServicesConfigUI.WMIProvider.RSInstance.get_Item(ConfigurationItemNames itemName)
   at ReportServicesConfigUI.ConfigurationManager.ResetStepStatus()
   at ReportServicesConfigUI.ConfigurationManager.ChangeMachine()
   at ReportServicesConfigUI.ConfigurationManager.LaunchDialog()
   at ReportServicesConfigUI.ConfigurationManager.tsbConnect_Cl

System.Runtime.InteropServices.COMException: List does not exist.

  

I just setup a list. I added a few items to it and then added my web part to the site. 

Now if I go back to the list settings under /_layouts/listedit.aspx?List=%7B5A3E222D%2D9350%2D49E9%2DB433%2D12D4223011E7%7D

I get the attached error. How did my list get removed and why can I still see items in it in AllItems.aspx?

 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.Runtime.InteropServices.COMException: List does not exist.

The page you selected contains a list that does not exist.  It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and locat

System.IO.IOException: Unable to read data from the transport connection

  
Hello,   I have an xml webservice calling another xml web service and occasionally i get the following error - any ideas why?Does this happen when the request is made or when reading the response? Also how i can prevent it from happening? Thanks   System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)   --- End of inner exception stack trace ---   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)   at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean readToUserBuffer)   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)   at System.Xml.XmlTextReaderImpl.ReadData()   at System.Xml.XmlTextReaderImpl.InitTextReaderInput(String baseUriStr, TextReader input)   at System.Xml.XmlTextReaderImpl..ctor(String url, TextReader input, XmlNameTable nt)   at System.Xml.XmlTextReader..ctor(TextReader input)   at System.Web.Services.Protocols.SoapHttpClientProtocol.GetReaderForMessage(SoapClientMessage message, I

Document is read-only in SharePoint, but user sees "check out" option in Office 2007 / Word / Excel

  
I am finding that when there is a document library in SharePoint with checkin/checkout required, if a user with read-only ("Visitor") permissions opens a document from that library, the document will open as read-only in Word, Excel, etc., but the user will see the "Server Document" bar with the message "To modify this document, you must check it out" and the "check out" button.  When the user tries to check the document out, they are asked to authenticate, and then receive the error "Cannot perform this operation.  The file has been deleted or someone else has it checked out."    How is it possible to prevent a user with read-only rights in SharePoint from seeing the "Check out" option in Word or Excel?

Using IPC only channel getting Unable to cast object of type 'System.Runtime.Remoting.Identity' to

  

I have a remoting application that is using delegates to preform callbacks between processes. I found that if I don't use a TCP channel at all and only initialize an IPC channel that the callback delegates start throwing the following error after about a minute has passed.

From what little I could find on Google it seems to be a Lifetime Service management issue but all the classes that the delegates belong to return null from InitializeLifetimeService which should give the object an infinite lifetime.

With the TCP channel initialized the issue doesn't happen, but I would like it to use the IPC channel if all of the processes are on the local box.

 

Type:        System.InvalidCastException
Message:    Unable to cast object of type 'System.Runtime.Remoting.Identity' to type 'System.Runtime.Remoting.ServerIdentity'.
Stack Trace:   
Server stack trace:
   at System.Runtime.Remoting.RemotingServices.GetServerTypeForUri(String URI)
   at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)

Exception

Document becomes locked as Read only by System Account

  

I have a document library in SP2010 where a document has been checked out by "System Account" and locked as Read Only.

Logged in with site collection administrator credentials (which also have full control in the web app via policy) I am not able to edit, check in, discard checkout, administratively force check in, or delete the document. I am able to open it in read only mode in both the client and Office Web Apps. This library does have a standard, OOB approval workflow attached. The WF is not customized. I see that the Workflow Timer Job becomes set to "Paused" when this runs.

I have tried cancelling the the workflow tasks and terminating the workflow. But, it does not release the check out by System Account or the read only status. 

I logged in as the Farm Admin account, which is recognized as System Account, and tried all these things, but still no results.

I have cycled the SharePoint Timer service, but this didn't alleviate either the check out status or the read only lock.

I have restarted the WFE server and the SQL server. But, the check out and lock remain.

I do not have the option of deleting this document library as there is too much content to manage. This is only a single document in the library, not all the documents in the library

Document becomes locked as Read only by System Account

  

I have a document library in SP2010 where a document has been checked out by "System Account" and locked as Read Only.

Logged in with site collection administrator credentials (which also have full control in the web app via policy) I am not able to edit, check in, discard checkout, administratively force check in, or delete the document. I am able to open it in read only mode in both the client and Office Web Apps. This library does have a standard, OOB approval workflow attached. The WF is not customized. I see that the Workflow Timer Job becomes set to "Paused" when this runs.

I have tried cancelling the the workflow tasks and terminating the workflow. But, it does not release the check out by System Account or the read only status. 

I logged in as the Farm Admin account, which is recognized as System Account, and tried all these things, but still no results.

I have cycled the SharePoint Timer service, but this didn't alleviate either the check out status or the read only lock.

I have restarted the WFE server and the SQL server. But, the check out and lock remain.

I do not have the option of deleting this document library as there is too much content to manage. This is only a single document in the library, not all the documents in the library.  


Charset Problem with dynamically generated Word Document

  

in my asp.net web application i am dynamically generating a word documnet out of a sql data. I have set the char set UTF-8 during the doument creation in code but still when i open the generated document and check it char set .. it is always windows-1252 not the one that i have set. My sql data in the document have special characters whihc can only be understandable using the UTF-8 charset otherwise its always ?T written in place of an apostrophy . Pasting my code here..

         HttpContext.Current.Response.Clear();
         HttpContext.Current.Response.ContentType = "application/msword";
         HttpContext.Current.Response.ContentEncoding = System.Text.UnicodeEncoding.UTF8;
         HttpContext.Current.Response.Charset = "utf-8";
         string strFileName = "Details" + ".doc";
        HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);
        StringBuilder strHTMLContent = new StringBuilder();
        string strMessage = " ";
        DataView abstractview = (DataView)dsAbstract.Select(DataSourceSelectArguments.Empty);
        foreach (DataRowView row1 in abstractview)
        {
            strMessage += "<table border='1' cellspacing='0' cellpadding='5' width

Embed word document inside excel

  

Hi,

I am using ASP.NET and C# 2.0 and working on web application.

I want to embed a word document inside a excel sheet.

How to embed word document inside excel.

Thank you

 

 


Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. T

  

when a crystal report for same id is opened again at same time or refreshed then it gives the

"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."


Stack Trace is :-


Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0
CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204
CrystalDecisions.

Advanced Basics: Setting Word Document Properties the Office 2007 Way

  

The last time I wrote this column (March 2006), I shared an application that allows you to update all the Microsoft® Word documents in a folder and its subfolders. Each time the application finds a document in the specified path, it updates the document properties to match those you specified in the application.

Ken Getz

MSDN Magazine June 2006


Advanced Basics: Set Word Document Properties Programmatically

  

At the beginning of another lovely day of writing courseware in mad pursuit of unrealistic deadlines, I received a frantic call from a business partner. He was at the end of a long consulting project and had several hundred Microsoft® Word documents, all of which required their document properties to be set identically, except the Title property of the document, which was to be based on the document file name, minus the .

Ken Getz

MSDN Magazine March 2006


Unable to cast object of type 'System.Web.Mvc.ValueProviderResult' to type 'System.IConvertible'

  

Hello,
 Why am I getting this error on line:

               sp.Price = Convert.ToDecimal(collection.GetValue("Price"));

sp is :
  SPecials_Templates sp = new SPecials_Templates();

SPecials_Templates Defined:

    [MetadataType(typeof(SPecials_TemplatesMetaData))]
    public partial class SPecials_Templates
    {
        public class SPecials_TemplatesMetaData
        {

                [ScaffoldColumn(false)]
            public object Key { get; set; }
            [StringLength(50)]
            public object Template_Name { get; set; }
            [StringLength(12)]
            public object Headline { get; set; }
            [StringLength(12)]
    &nbs

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend