473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Are there problems running Microsoft.Office.Interop.Access on Windows Server 2003?

Hey all,

I have written a Windows Forms application in VB.NET that creates a WCF Server. This server uses the Microsoft.Office.Interop.Access library to get a list of all of the MS Access Reports in a *.mdb file and returns that list as a List(Of String) to a client that is implemented in an ASPX page hosted on IIS on the same machine.
I built the project on my WinXP development workstation and am now trying to deploy it onto a Windows Server 2003 server. I can access most of the Interop library correctly, and the PIA is installed correctly. I get a problem on:

Expand|Select|Wrap|Line Numbers
  1. Public Function GetReports() As List(Of String) Implements IHarpWCF.GetReports
  2.         Dim reports As New List(Of String)
  3.         Try
  4.             Dim accessReports As Microsoft.Office.Interop.Access.AllObjects
  5.             accessReports = m_Access.CurrentProject.AllReports
  6.             If accessReports.Count < 1 Then
  7.                 reports.Add("There are no reports in the database at " + m_targetDatabase)
  8.             End If
  9.  
  10.             Dim iter As System.Collections.IEnumerator
  11.             iter = accessReports.GetEnumerator()
  12.             While iter.MoveNext()
  13.                 reports.Add(iter.Current.Name())
  14.             End While
  15.         Catch ex As Exception
  16.             RaiseEvent ServerError(Me, ex.ToString())
  17.  
  18.         End Try
  19.         Return reports
  20.     End Function
  21.  
The exception reads:
System.Runtime.InteropServices.COMException (0x800A09A3): The expression you entered refers to an object that is closed or doesn't exist. at Microsoft.Office.Interop.Access._CurrentProject.ge t_AllReports() at Harp_WCF.HARP_WCF.GetReports().

I expect that, perhaps, the issue is that the application is being run in a different user context on the IIS machine perhaps? Could there be a security issue with using the Interop libraries on Windows Server 2003? I'm kind of out of ideas since it runs fine on my XP machine, but I have to believe that there is just some hoop I can jump through to get it working on the server.

TIA,
Jason
Jan 31 '11 #1
0 1655

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ruslan | last post by:
Hi, I use Microsoft.Office.Interop.Word in order to generate word documents. On my computer it works well. When I put it on a new computer with Windows 2003 an "Access Denied" message...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
1
by: garyinmiami2003 | last post by:
Can someone help me? I am running Visual Studio 2003, Framework 1.1 and IIS (do remember), and OFFICE 2003. I noticed when trying to use it that visual studio could not find...
1
by: Alan T | last post by:
VS 2005 and MS Office 2003 installed. I can include Microsoft.Office.Core and Word in the references so I can add the using Microsoft.Office.Interop.Word. However, my workmate cannot do the...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
0
by: KnighT | last post by:
I did the whole PIA thing, now I just want to use this COM interface. When I run this code from my computer using a windows form it works properly. However, I am trying to install this as a...
9
by: sajithkahawatta | last post by:
my web page C#.net is work properly in my iis .but when i publish in another server it give errers.i used vs2005 and ms word 2003. but in the server there is no vs2005 or word installed. it has only...
1
by: mac73 | last post by:
Hi, I am using asp.net 2.0 application with Microsoft.Office.Interop.Word version 11.0.0.0 on windows server 2003 with IIS 6.0. It works fine with access given to Network service. The scenario...
0
by: frederick.the.fool | last post by:
I'm writing a project that does Visio automation. I'm writing it in C+ +/CLI because it needs to reference a good amount of native C++ code. One way to call the Visio API, of course, is to use...
3
OuTCasT
by: OuTCasT | last post by:
Hi I have created an asp.net project that exports items from datagridview to and outlook calendar This is the code that i have used.. Dim body As String Dim ends As String ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.