Discussion:
ASP.NET Web Service
(too old to reply)
Russ Wagner
2006-11-06 20:30:02 UTC
Permalink
Hello:

I have completed a number of "Windows" sample applications using the SDK
with Microsoft Office Accounting 2007 (Visual Studio 2005 in C#) to query
inventory and customers. I was hoping to get some guidance on converting
these applications to Web Services.

My first kick-at-the-can yeilded the following (below).

Any help would be greatly appreciated.

Thanks

Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.LoaderException:
Invalid configuration file.
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConfigurationFromFile(String file)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String configurationFile, Boolean autoRedirect)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String configurationFile)
at Service.HelloWorld() in
c:\Inetpub\wwwroot\SBA_Inventory\App_Code\Service.cs:line 78
--
Russ Wagner
Calgary
Jesper [MS]
2006-11-09 00:54:31 UTC
Permalink
Hi Russ

It is hard to say for sure without more info but it sounds like the file
you're passing in to the Loader is not valid - have you verified that it is
the full path and that the file is a valid sbc-file?
Also; please take a look at this blog which describes the Loader:
http://blogs.msdn.com/jesperbirkolsen/
Hope that helps, otherwise please provide more info.
--
Thanks
Jesper
http://blogs.msdn.com/jesperbirkolsen/
Post by Russ Wagner
I have completed a number of "Windows" sample applications using the SDK
with Microsoft Office Accounting 2007 (Visual Studio 2005 in C#) to query
inventory and customers. I was hoping to get some guidance on converting
these applications to Web Services.
My first kick-at-the-can yeilded the following (below).
Any help would be greatly appreciated.
Thanks
Invalid configuration file.
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConfigurationFromFile(String
file)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile, Boolean autoRedirect)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile)
at Service.HelloWorld() in
c:\Inetpub\wwwroot\SBA_Inventory\App_Code\Service.cs:line 78
--
Russ Wagner
Calgary
Russ Wagner
2006-11-09 02:56:02 UTC
Permalink
Hi Jesper:

Thanks for your reply :-)

I managed to get my sample web service working.

After instantiating the ILoader, I was incorrectly calling
one of the GetSbaObjects overloads. The following worked:

sbi = ldr.GetSbaObjects("sampleproductcompany", "FRED\\MSSMLBIZ",
true).SmallBusinessInstance as ISmallBusinessInstance;

where "FRED" is my server (2003) name.

Then, to allow remote computers to use the web service:

1) Turn on Local and remote connections for MSSMLBIZ

(Under Start/Programs/SQL Server 2005/Configuration Tools
select SQL Server Surface Area Configuration
select Surface Area Configuration for Service and Connections
select MSSMLBIZ/Database Engine/Remote Connections
select Local and Remote connections for TCP/IP only).

2) Stop and start MSSMLBIZ service.

(Under Start/Programs/SQL Server 2005/Configuration Tools
select SQL Server Configuration Manager
select SQL Server 2005 Services
right-click SQL Server Server (MSSMLBIZ), select stop
right-click SQL Server Server (MSSMLBIZ), select start).
--
Russ Wagner
Calgary
Post by Jesper [MS]
Hi Russ
It is hard to say for sure without more info but it sounds like the file
you're passing in to the Loader is not valid - have you verified that it is
the full path and that the file is a valid sbc-file?
http://blogs.msdn.com/jesperbirkolsen/
Hope that helps, otherwise please provide more info.
--
Thanks
Jesper
http://blogs.msdn.com/jesperbirkolsen/
Post by Russ Wagner
I have completed a number of "Windows" sample applications using the SDK
with Microsoft Office Accounting 2007 (Visual Studio 2005 in C#) to query
inventory and customers. I was hoping to get some guidance on converting
these applications to Web Services.
My first kick-at-the-can yeilded the following (below).
Any help would be greatly appreciated.
Thanks
Invalid configuration file.
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConfigurationFromFile(String
file)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile, Boolean autoRedirect)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile)
at Service.HelloWorld() in
c:\Inetpub\wwwroot\SBA_Inventory\App_Code\Service.cs:line 78
--
Russ Wagner
Calgary
jalvarezca
2009-10-21 17:43:01 UTC
Permalink
Hi.

Are You been able of running the web service in a different server from the
sql server?

I'm using an IIS 6 server /W2003 hosting the web service that have to
connect to another server where the accounting is.

The webservice works fine in the same server, but in the previos scenario I
received an error every time I try to run the services.

This is it:

Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.LoaderException:
Connection to database failed or the supplied database is not a Microsoft
Office Accounting database. ---> System.Data.SqlClient.SqlException: Cannot
open database "iteco" requested by the login. The login failed.
Login failed for user 'INNOVATECH\VIRTUAL-281$'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.GetConnection(String databaseName, String serverString)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.RetrieveDatabaseVersionInformation()
--- End of inner exception stack trace ---
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.RetrieveDatabaseVersionInformation()
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector..ctor(String databaseName, String serverName)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.GetConnector(IConfiguration configuration)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConnector(String databaseName, String serverName)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConnector(IConfiguration configuration)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConnector(String configurationFile)
at Innova.AccountingDA.ObjetoAccountingDA.LoadSbaObjects() in
D:\Akademia\AccountingWS\pjtAccountingDA\ObjetoAccountingDA.cs:line 85
at Innova.AccountingDA.BaseAccountig..ctor() in
D:\Akademia\AccountingWS\pjtAccountingDA\BaseAccountig.cs:line 21
at Innova.AccountingDA.CuentaContableDA..ctor()
at Innova.AccountingBC.CuentaContableBC.getListaCuentasBC(String
condicionNumeroCuenta, String condicionNombreCuenta)
at AccountingWS.getListaCuentas(String condicionNumeroCuenta, String
condicionNombreCuenta)


Any clue?
Post by Russ Wagner
Thanks for your reply :-)
I managed to get my sample web service working.
After instantiating the ILoader, I was incorrectly calling
sbi = ldr.GetSbaObjects("sampleproductcompany", "FRED\\MSSMLBIZ",
true).SmallBusinessInstance as ISmallBusinessInstance;
where "FRED" is my server (2003) name.
1) Turn on Local and remote connections for MSSMLBIZ
(Under Start/Programs/SQL Server 2005/Configuration Tools
select SQL Server Surface Area Configuration
select Surface Area Configuration for Service and Connections
select MSSMLBIZ/Database Engine/Remote Connections
select Local and Remote connections for TCP/IP only).
2) Stop and start MSSMLBIZ service.
(Under Start/Programs/SQL Server 2005/Configuration Tools
select SQL Server Configuration Manager
select SQL Server 2005 Services
right-click SQL Server Server (MSSMLBIZ), select stop
right-click SQL Server Server (MSSMLBIZ), select start).
--
Russ Wagner
Calgary
Post by Jesper [MS]
Hi Russ
It is hard to say for sure without more info but it sounds like the file
you're passing in to the Loader is not valid - have you verified that it is
the full path and that the file is a valid sbc-file?
http://blogs.msdn.com/jesperbirkolsen/
Hope that helps, otherwise please provide more info.
--
Thanks
Jesper
http://blogs.msdn.com/jesperbirkolsen/
Post by Russ Wagner
I have completed a number of "Windows" sample applications using the SDK
with Microsoft Office Accounting 2007 (Visual Studio 2005 in C#) to query
inventory and customers. I was hoping to get some guidance on converting
these applications to Web Services.
My first kick-at-the-can yeilded the following (below).
Any help would be greatly appreciated.
Thanks
Invalid configuration file.
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConfigurationFromFile(String
file)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile, Boolean autoRedirect)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile)
at Service.HelloWorld() in
c:\Inetpub\wwwroot\SBA_Inventory\App_Code\Service.cs:line 78
--
Russ Wagner
Calgary
jalvarezca
2009-10-21 21:00:05 UTC
Permalink
Fortunately, I founded the solution myself.

You have to grant permission in the Sql server database by creating a new
login to the user "DomainName/MachineName$"

The same in the accounting Add User option.

That's it.
Post by jalvarezca
Hi.
Are You been able of running the web service in a different server from the
sql server?
I'm using an IIS 6 server /W2003 hosting the web service that have to
connect to another server where the accounting is.
The webservice works fine in the same server, but in the previos scenario I
received an error every time I try to run the services.
Connection to database failed or the supplied database is not a Microsoft
Office Accounting database. ---> System.Data.SqlClient.SqlException: Cannot
open database "iteco" requested by the login. The login failed.
Login failed for user 'INNOVATECH\VIRTUAL-281$'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.GetConnection(String databaseName, String serverString)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.RetrieveDatabaseVersionInformation()
--- End of inner exception stack trace ---
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.RetrieveDatabaseVersionInformation()
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector..ctor(String databaseName, String serverName)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Connector.GetConnector(IConfiguration configuration)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConnector(String databaseName, String serverName)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConnector(IConfiguration configuration)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConnector(String configurationFile)
at Innova.AccountingDA.ObjetoAccountingDA.LoadSbaObjects() in
D:\Akademia\AccountingWS\pjtAccountingDA\ObjetoAccountingDA.cs:line 85
at Innova.AccountingDA.BaseAccountig..ctor() in
D:\Akademia\AccountingWS\pjtAccountingDA\BaseAccountig.cs:line 21
at Innova.AccountingDA.CuentaContableDA..ctor()
at Innova.AccountingBC.CuentaContableBC.getListaCuentasBC(String
condicionNumeroCuenta, String condicionNombreCuenta)
at AccountingWS.getListaCuentas(String condicionNumeroCuenta, String
condicionNombreCuenta)
Any clue?
Post by Russ Wagner
Thanks for your reply :-)
I managed to get my sample web service working.
After instantiating the ILoader, I was incorrectly calling
sbi = ldr.GetSbaObjects("sampleproductcompany", "FRED\\MSSMLBIZ",
true).SmallBusinessInstance as ISmallBusinessInstance;
where "FRED" is my server (2003) name.
1) Turn on Local and remote connections for MSSMLBIZ
(Under Start/Programs/SQL Server 2005/Configuration Tools
select SQL Server Surface Area Configuration
select Surface Area Configuration for Service and Connections
select MSSMLBIZ/Database Engine/Remote Connections
select Local and Remote connections for TCP/IP only).
2) Stop and start MSSMLBIZ service.
(Under Start/Programs/SQL Server 2005/Configuration Tools
select SQL Server Configuration Manager
select SQL Server 2005 Services
right-click SQL Server Server (MSSMLBIZ), select stop
right-click SQL Server Server (MSSMLBIZ), select start).
--
Russ Wagner
Calgary
Post by Jesper [MS]
Hi Russ
It is hard to say for sure without more info but it sounds like the file
you're passing in to the Loader is not valid - have you verified that it is
the full path and that the file is a valid sbc-file?
http://blogs.msdn.com/jesperbirkolsen/
Hope that helps, otherwise please provide more info.
--
Thanks
Jesper
http://blogs.msdn.com/jesperbirkolsen/
Post by Russ Wagner
I have completed a number of "Windows" sample applications using the SDK
with Microsoft Office Accounting 2007 (Visual Studio 2005 in C#) to query
inventory and customers. I was hoping to get some guidance on converting
these applications to Web Services.
My first kick-at-the-can yeilded the following (below).
Any help would be greatly appreciated.
Thanks
Invalid configuration file.
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetConfigurationFromFile(String
file)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile, Boolean autoRedirect)
at
Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.Loader.GetSbaObjects(String
configurationFile)
at Service.HelloWorld() in
c:\Inetpub\wwwroot\SBA_Inventory\App_Code\Service.cs:line 78
--
Russ Wagner
Calgary
Continue reading on narkive:
Loading...