on 05-05-2006 5:30 PM
Hi to all,
I'm having problems to connect to the database server trough webservices.
I'm using: Windows XP, IIS 5.1, .NET 1.1 and VS2003
and: SBO2004A with DI API
When I invoke the webservice Connect() I get the following message: Connection to SBO-Common has failed.
This is my code:
Public Class Service1
Inherits System.Web.Services.WebService
Dim sErrMsg As String
Dim lErrCode As Integer
Dim result As String
Public oCompany As SAPbobsCOM.Company
<WebMethod()> _
Public Function Connect() As String
result = ConnectToCompany()
Return result
End Function
Private Function ConnectToCompany()
oCompany = New SAPbobsCOM.Company
oCompany.Server = "(local)"
oCompany.CompanyDB = "SBODemo_US"
oCompany.UserName = "manager"
oCompany.Password = "manager"
oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English
oCompany.UseTrusted = True
oCompany.Connect()
'// Check for errors during connect
oCompany.GetLastError(lErrCode, sErrMsg)
If lErrCode <> 0 Then
Return sErrMsg
Else
Return "Success"
End If
End Function
End Class
Tkx in advance.
Vítor
Hi Vitor,
This can be because the SBO version differs from your DI API, try using the ip and not server name, try UseTrusted =false. and the set the DBType to 4 or 6 (it depends).
This would be the common problems...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solution: Changed some configs in SQL and I eventually got it to connect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Please help,
I have a SAP Server with B1 2007 on and we have web site source code on a old web server that we want to move to the new web server.
Get the error -111 Failed to connect to SBO Common...
The old web server DIAPI test app I wrote works but on the new web server it doesn't
1. The ports is opened
2. I can ping the SAP server and access the DB's through sql.
Any ideas please ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I happened to the same problem.
And I give right to DCOM SBOLicense.
But the error message changes to 'Error initializing the DB layer.'
Who can tell me how to solve this problem.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tkx guys!
Well... the fiscal period is updated and I've tried the DbUserName and DbPassword but I get the same error.
I've also replaced the server name "(local)" with my actual server name and nothing!
Any more tips?
Tkx,
Vítor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Once again tkx guys.
The DI API version is the same as the SBO version.
In fact, I can connect to the server on a normal project, I only have this problem developing the web service!
I've also tried the username & password, dbusername & password and changed the UseTrustedLink to false, but I got the message "Access denied".
I'm developing the webservice on a ASP.Net Web Service project. Can this be the problem?
Tkx.
Regards,
Vítor.
Hi Vitor,
Perhaps you should try adding the ASP.Net user to the
DCOM rights. This one is the user which uses the
webservice, and should have rights to execute the
SBOLicence DCOM.
Regards,
Ibai Peña
God I need to try this. I've been looking for a solution to that problem since a few days. I hope I will succeed
Marc,
Did you ever fix this? Myself and another programmer have been going thru the same agony. I think the issue is that we're developing on workstations and the License Server is on another machine.
We're not in the domain, but can authenticate to the other machine. That other machine (License machine) seems not to be able to authenticate our local web user (ASPNET) for the license verification.
I'm pulling what is left of my hair out over this - any ideas?
Hi Expert,
Am facing the same issue for the moment. I had develop a web services application using VB2005, tried it out at ASP.NET development server and it works fine. But, once i copy the folder and transfer to IIS server, error occurs, 111 - Failed to Connect to SBOCommon. Any clues for this?
Thanks.
Regards,
Yean
Hi Vitor,
Try settingthe DbUser and DbPassword properties of the company.
Regards
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vítor Oliveira
I do not see anything wrong with your code, the only thing i can think of is that you are trying to connect to the demo database. But that demo database is old, if you log into it through the front end you'll see the fiscal period is old. Add-ons will NOT connect to companies where the fiscal period is not valid. So either make new fiscal/financial period or connect to a db that has valid fiscal periods.
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.