PC Review


Reply
Thread Tools Rate Thread

Automation Error: :"Object reference not set to an instance of an

 
 
=?Utf-8?B?QmFkaXM=?=
Guest
Posts: n/a
 
      27th Apr 2007
I'm doing a server side automation(I know it's bad but..) and its working
fine locally and when accessing it from a remote machine using web browser is
was giving me this error"Retrieving the COM class factory for component with
CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80070005". so I configured the server using dcomcnfg as described in this
link:
http://support.microsoft.com/kb/288368/
and know this error now is gone but I'm having this error:"Object reference
not set to an instance of an object." when it comes to the last line of this
code:

Word.Application wrdApp;
Word._Document wrdDoc;
wrdApp = new Word.Application();
wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse,
ref oMissing, ref oMissing);
wrdDoc.Select();



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgUml0Y2hpZSBbQyMgTVZQXQ==?=
Guest
Posts: n/a
 
      27th Apr 2007
It's suggesting that wrdDoc is null.

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#


"Badis" wrote:

> I'm doing a server side automation(I know it's bad but..) and its working
> fine locally and when accessing it from a remote machine using web browser is
> was giving me this error"Retrieving the COM class factory for component with
> CLSID
> {000209FF-0000-0000-C000-000000000046} failed due to the following error:
> 80070005". so I configured the server using dcomcnfg as described in this
> link:
> http://support.microsoft.com/kb/288368/
> and know this error now is gone but I'm having this error:"Object reference
> not set to an instance of an object." when it comes to the last line of this
> code:
>
> Word.Application wrdApp;
> Word._Document wrdDoc;
> wrdApp = new Word.Application();
> wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse,
> ref oMissing, ref oMissing);
> wrdDoc.Select();
>
>
>

 
Reply With Quote
 
=?Utf-8?B?QmFkaXM=?=
Guest
Posts: n/a
 
      30th Apr 2007
So, why it's woking when I run it in local machine that contain the project,
the problem comes only when I run it from a remote machine!!!?



"Peter Ritchie [C# MVP]" wrote:

> It's suggesting that wrdDoc is null.
>
> --
> Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
> http://www.peterRitchie.com/blog/
> Microsoft MVP, Visual Developer - Visual C#
>
>
> "Badis" wrote:
>
> > I'm doing a server side automation(I know it's bad but..) and its working
> > fine locally and when accessing it from a remote machine using web browser is
> > was giving me this error"Retrieving the COM class factory for component with
> > CLSID
> > {000209FF-0000-0000-C000-000000000046} failed due to the following error:
> > 80070005". so I configured the server using dcomcnfg as described in this
> > link:
> > http://support.microsoft.com/kb/288368/
> > and know this error now is gone but I'm having this error:"Object reference
> > not set to an instance of an object." when it comes to the last line of this
> > code:
> >
> > Word.Application wrdApp;
> > Word._Document wrdDoc;
> > wrdApp = new Word.Application();
> > wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse,
> > ref oMissing, ref oMissing);
> > wrdDoc.Select();
> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automation "Object reference not set to an instance of an object." =?Utf-8?B?QmFkaXM=?= Microsoft ASP .NET 3 1st May 2007 01:19 AM
Error "object reference not set to instance of an object" when trying to set datasource property of a bound column in datagrid control Martin Widmer Microsoft VB .NET 0 23rd Jan 2006 09:24 AM
adodc error "object reference not set to instance of object" =?Utf-8?B?aG93aWU=?= Microsoft Dot NET 0 7th Nov 2005 07:40 PM
Datagrid.databind() causes "Object reference not set to an instance of an object" error Karim Microsoft ASP .NET 0 10th Jun 2005 08:39 PM
Strange "Object reference not set to an instance of an object" error in webform Chris Magoun Microsoft ASP .NET 1 20th Aug 2004 05:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:44 PM.