COMException: "Object hasn't been initialized and can't be used yet" - c#

I am using Document imaging library for parsing text from image. My code is working fine on local but facing problem while deploying in windows server 2003.
Can anyone help me on this?

Make sure MODI is installed(it will be there in MS Office Tools if installed).If not go through the link and install(http://www.mydigitallife.info/how-to-open-mdi-microsoft-document-imaging-format-with-office-2007/).if Still you r getting same error then try this
1)Go to IIS->ApplicatioPools->Default Applicationpool->Identity->custom account->Give the user name and password.

Related

Xamarin barcode app Zxing.Net.Mobile not working

I followed this tutorial "https://github.com/Redth/ZXing.Net.Mobile" when I use Live Preview and pair it with my android device and try to hit scan button the code breaks and it gives error like "Exception of type 'System.Collections.Generic.KeyNotFoundException' was thrown".
The error is thrown on very first line.
var scanPage = new ZXingScannerPage();
I 'm new to this one and not sure how to solve, if possible please let me know any barcode code which reads as well as scan in Visual studio 2017.
So I have checked in the github as well, its clear from forum that live preview has issues related to System.Collections.Generic.KeyNotFoundException so either have device connected or install some emulator and check.

Access Denied when calling mc_login()

I stumbled upon MantisBT recently and got it set up at my workplace for future bug tracking. I wanted to make a neat little library we can use in our applications so that users can report bugs to us directly from the application in question.
Currently in a sandbox application I made to try and understand MantisConnect. I consumed the webservice successfully and I can make a client. But if I try and do this:
MantisConnectPortTypeClient client = new MantisConnectPortTypeClient();
UserData usrData = client.mc_login("omitted", "omitted");
I get a FaultException and the message "Access Denied"
Currently running Mantis 1.3.rc-dev.02
Any ideas on why this simple call is denied? It doesn't matter what user I use. It gets denied regardless.
Okay I figured it out.
The WSDL file on the server was still pointing to mantisbt.org instead of our local server. Changed it to our local server address and it worked fine.

Word Automation Services - job failed with error 131172

We are facing a problem with Word Automation Services in Sharepoint 2010. We have a workflow, which queues a conversion job (docx to pdf). In our dev environment, everything works well, but in production, a strange error occurs. No error shown anywhere, but file is simply not created. The only diagnostics is, that it puts error number 131172 to Items table in Word Automation Services database.
Nothing goes to SP log (log level set to information) and nothing to event log. Our error number is not listed in documentation. Timer is up and running..
Piece of code which queues job (nothing very special):
ConversionJobSettings jobSettings;
ConversionJob pdfConversion;
string wordFile;
string pdfFile;
jobSettings = new ConversionJobSettings();
jobSettings.OutputFormat = SaveFormat.PDF;
jobSettings.MarkupView = MarkupTypes.Text;
pdfConversion = new ConversionJob("Word Automation Services", jobSettings);
pdfConversion.UserToken = web.CurrentUser.UserToken;
pdfConversion.AddFile(wordFile, pdfFile);
pdfConversion.Start();
Have anyone seen this kind of error?
We had the same problem on Czech version of SharePoint 2019, which was resolved by installing English language pack.

ADODB with Crystal report error using c# 2008

I'm using Visual Studio 2008 and SqlExpress to develop a windows application.
I have created a database and trying to create a Crystal report using it. But when I use the Wizard to create the Report( as I use OLE DB Provider for Sql Server) I get the following Error message:
Title of the error message:
Crystal Reports ActiveX Designer
Body of the error message says:
Not Implemented
Details:Error Code:0x
Source: ADODB.Connection
Description:Object or Provider is not capable of performing requested operation.
Can anyone help me out of this problem. I'm a very new person in this field, so it will be helpfull if you help me in details..
Thanks in Advance.
This thread on MSDN indicates that for some this problem was caused by an unusual database name with special characters. Does yours contain something like . or # ?

IIS Permissions for Saving Word Documents

Our ASP.NET/C# lets users edit and manage Word (OpenXML) documents that are hosted on a server. I am using client-side VBScript functions to handle some of the editing functions including saving the document to a folder on the server. For the save functionality, I am using the following function call :
Document.SaveAs "http://server/savefolder/savefile.docx"
I have given "Full Control" permissions on savefolder to both the NETWORK SERVICE and the IUSR_MACHINE users. Yet the above call fails. The error number returned is 5096. The error message is some gibberish that doesn't make any sense.
The server is Windows 2003 and the IIS version is 6.0. I have installed the OpenXML SDK 2.0 CTP on the server.
I can successfully read and print documents.
Does anyone tell me what I am doing wrong? or what additional settings need to be in place?
BTW, the error message ("gibberish" from my post) is:
"EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI"
No, I am not making this up!
In my case, that error 5096 with description "EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI"
occurred when using VBA code in Access to drive a Word mail-merge. The cause was trying to save a document with the same name (including path) as an open document.
Error line:
objApp.ActiveDocument.SaveAs saveAsName
where objApp is the object variable representing the Word application and saveAsName is the string variable storing the name I am trying to save the file as e.g. "C:\temp\testdoc.docx".
IF a file with the same name exists but is not open, the above code overwrites it silently.
Turns out WebDAV is not turned on by default in IIS 6.0. Once I turned it on, I was able to save the documents just fine.
Thanks for all your answers!
Just a guess... if the vbscript is running on the client, the code is probably running under the user's account, not under the server's IIS account. So unless you give write access to that user, vbscript probably won't work for this.
Since you're using ASP.NET, you could try writing a web service that takes in Word document data and saves it to the server for you.
I'd try running Fiddler on the client while trying to save the document to get a sense of what's really going on. I wonder if maybe it's trying to do an HTTP PUT (as opposed to a POST).
Have you given write access to the folder in IIS manager?
Is the save folder you're using outside of the websites root directory, i.e. 'hidden' from the internet?
Just to add to SI's information...
I also get this I get the 5096 - EOALPHABETICARABICARABICABJADARABICALPHABAHTTEXTCAPSCARDTEXTCHARFORMATCHI error when my code tries to save a MS Word document with the same name and to the same location as a Word document that is already open in another instance of Word.
Although not entirely relevant to this thread, I hope it may help someone else who stumbles upon this thread!
Regards,
Duane,
this question is old but still active ?
You save the file with a http://... url, i think you should save it with a file URL as
Document.SaveAs "\\server\savefolder\savefile.docx"
Grtz

Categories

Resources