cancel
Showing results for 
Search instead for 
Did you mean: 

Not found error when connect to SAP B1 from website via B1WS

Former Member
0 Kudos

Dear experts!

I create a simple website and reference to B1WS to login SAP B1 throught website. The result appears the message :"

The request failed with HTTP status 404: Not Found. " on browser. I debug, i see that, the connection string is problem.

My connection string:

string sSessionID = null;

        oCompanyService = new localhost.CompanyService();

        sSessionID = oLoginService.Login("10.169.10.40",

                                         "Test_Sand",

                                         localhost.LoginDatabaseType.dst_MSSQL2005,

                                         false,

                                         "manager",

                                         "123456",

                                         localhost.LoginLanguage.ln_English,

                                         true,

                                         "10.169.10.40:30000");

in parameter: localhost.LoginDatabaseType , i do not see the value dst_MSSQL2008 to choose, althought, infact, my SAP B1 database is MSSQL2008.

So, can anyone show me how to choose value dst_MSSQL2008 in connection string, and fix the error above?

Thanks and regards!

Long.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos
pedro_magueija
Active Contributor
0 Kudos

Hi Nham,

Try this:

        localhost.LoginService oLoginService = new localhost.LoginService();

        oLoginService.Url = "http://10.169.10.40/B1WS/Service.asmx";

        sSessionID = oLoginService.Login("10.169.10.40",

                                         "Test_Sand",

                                         localhost.LoginDatabaseType.dst_MSSQL2005,

                                         false,

                                         "manager",

                                         "123456",

                                         localhost.LoginLanguage.ln_English,

                                         true,

                                         "10.169.10.40:30000");

This happens because .NET usually places localhost in the webservice address.

You can alternatively change it in LoginService.wsdl (in your project) and app.config/web.config (depending on your type of project).

Good luck.

Best regards,

Pedro Magueija

Former Member
0 Kudos

Dear Pedro Magueija,

I tried follow you, but it is still error. I can access URL: http://10.169.10.40/B1WS/Service.asmx by web browser, always message appear:

HTTP Error 404 - File or directory not found. And in the default website (IIS), i do not see the file Service.asmx.

Thanks and regards!

Long.

pedro_magueija
Active Contributor
0 Kudos

Hi Nham,

The "file" Service.asmx doesn't exist physically. But you can point your browser to it, when your configuration is done.

You probably have a configuration problem in IIS. Is your IIS server remote or your own machine?

Best regards,

Pedro Magueija

Former Member
0 Kudos

Hi Pedro Magueija,

IIS on my machine, and i am using browser on this machine to login the simple website. My machine is installed Window Server 2003. All configuration i following the document below:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0904cbd-b47f-2a10-b689-f1d683c22...

I have not problem in configuration process.

Thanks and regards!\

Long.

pedro_magueija
Active Contributor
0 Kudos

Hi Nham,

Ok, most likely you have the latest IIS so B1WS was created as a ASP.NET app pool.

Follow this:

1) Go to the IIS Manager

2) Under the Default Web Site click the B1WS

3) On the right side bar click Basic Settings

4) In the following window if the Application Pool reads any other then Classic .NET AppPool click the Select button and change it to Classic .NET AppPool

5) Restart your Default Web Site by clicking it and on the right hand side clicking restart.

6) Point your browser to the localhost/B1WS/Service.asmx and check that an invalid XML structure message appears.

Good luck,

Best regards,

Pedro Magueija

Former Member
0 Kudos

Dear Pedro Magueija,

Thanks for your effort to help me. I tried as you, but the problem is not resolved. But, this task is delayed and i must resolve other task has higher priority.

Thanks and regards!

Long.