Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCPAC SoapException

Status
Not open for further replies.

osumatt

Programmer
Dec 7, 2006
5
US
Hi everyone. I have an issue with ACCPAC & Web Services. I created my own .NET 1.1 web services that connects up to ACCPAC (using ACCPAC's .NET classes) and adds an order. The problem I am having is due to some kind of permissions issue, and I cannot figure it out. When I call into my web service, I get the following:

SoapException 1.2803.6

It occurs when my web service tries to connect to the ACCPAC database, which resides on another server. The interesting thing is, it works when I move the code from my web service into a windows application!

I would appreciate if anybody could shed some light on what permissions I need to give! I've tried everything I can think of, including granting 'Everybody' permissions on the ..\Program Files\ACCPAC folder.

Thanks in advance,
Matt

------------------------------------------------------------

Here is the code that connects to ACCPAC:

Dim session As New ACCPAC.Advantage.Session
Dim link As ACCPAC.Advantage.DBLink
Dim appID As String
Dim programName As String
Dim appVersion As String
Dim userID As String
Dim password As String
Dim companyID As String

'retrieve appID, programName, appVersion, userID, password & companyID

session.Init("", appID, programName, appVersion)
session.Open(userID, password, companyID, System.DateTime.Now, 0)
link = _session.OpenDBLink(ACCPAC.Advantage.DBLinkType.Company, ACCPAC.Advantage.DBLinkFlags.ReadWrite)

------------------------------------------------------------

And here is the detailed stack trace:

Event Type: Error
Event Source: ExceptionManagerPublishedException
Event Category: None
Event ID: 0
Date: 1/26/2007
Time: 3:32:51 PM
User: N/A
Computer: ESI
Description:

General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: ESI
ExceptionManager.TimeStamp: 1/26/2007 3:32:51 PM
ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName: /LM/W3SVC/1/Root/ROE/C-3-128143351711037280
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: ESI\ASPNET

1) Exception Information
*********************************************
Exception Type: ACCPAC.Advantage.SessionException
Reason: NotSpecified
Message:
TargetSite: SessionInfo Init(Int32, System.String, System.String, System.String, System.String, System.String, Boolean)
HelpLink: NULL
Source: ACCPAC.Advantage.Server

StackTrace Information
*********************************************
at ACCPAC.Advantage.Server.Session.Init(Int32 key, String objectHandle, String appID, String pgmName, String appVersion, String clientID, Boolean checkStatus)
at ACCPAC.Advantage.Session.Init(String objectHandle, String appID, String programName, String appVersion)
at C.WebServices.Orders..ctor(String connectionString)
at C.WebServices.CServices.UploadOrder(Byte[] order)

2) Exception Information
*********************************************
Exception Type: System.Runtime.InteropServices.COMException
ErrorCode: -2147467259
Message: 1.2803.6
TargetSite: Void Init(Int32, System.String, System.String, System.String, System.String, System.String, Boolean, Boolean ByRef, Byte[] ByRef)
HelpLink: NULL
Source: ACCPAC.Server.1

StackTrace Information
*********************************************
at AccpacCOMSVR.AccpacSvrSessionClass.Init(Int32 Key, String ObjectHandle, String AppID, String ProgramName, String AppVersion, String ClientID, Boolean CheckStatus, Boolean& IsOpened, Byte[]& SessionInfo)
at ACCPAC.Advantage.Server.Session.Init(Int32 key, String objectHandle, String appID, String pgmName, String appVersion, String clientID, Boolean checkStatus)

 
ettienne,

I appreciate your help. I have a couple questions about your answer. First off, how did you come to the conclusion that the problem was FQDN. Secondly, where am I supposed to specify the FQDN?

Thanks
Matt
 
99.9% it is the FQDN.
Can you open Accpac remotely via web deployment?
 
In case anyone else every runs into this, my co-worker figured out the problem:

In the web.config file, I added the following line:

<identity impersonate="true" />

Then in IIS setup, I opened the properties for my website, went to Directory Security tab, and clicked on “Edit” in the Anonymous Access group. I have the Anonymous checkbox checked, but change the user name and password from IUSR_machine to my domain user, domain\user. After restarting IIS it worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top