cancel
Showing results for 
Search instead for 
Did you mean: 

Service layer Login session in c# wcf

rahuljain257
Participant
0 Kudos

Hello Techies,

This is a follow up from the following post Click Here from n007praveen71 but I am not able to integration the .net application with sap b1 service layer. Please find the steps [images] which I referred in my application but didn't got any success -

IDE - Visual Studio 2019

Referred the following blog - How to consume Service Layer oData services from .NET via WCF

SAP Version

B1S.CONF File

Step 1 File

Step 2 File

Step 3 File

Error Details

Required your support here :-

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi rahul.jain257,

Can you share the exact error details in Step 3 File?

Also, mention what is the SAP Business One Version and patch where you are having this issue?

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

rahuljain257
Participant
0 Kudos

Thanks for your reply... Ankit sir. I have updated my original post with more details.

n007praveen71
Participant

Hi rahul.jain257

 try adding the service using the URL of your SAP,

-----> https://Your server name:50000/b1s/v1/$metadata
------> give the user name and password for authentication

Username: {"CompanyDB": "company database name", "UserName": "manager"} //note:include the curly brackets as well

Password: (Your manager password)

-------> repeat the User name and password 3 or 4 times then your service will be loaded in your visual studio
-------> Make sure your project's Framework is Version 4.
-------> and also make sure you have installed Microsoft Odata services in Visual studio, If not try this link to install it

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi rahul.jain257,

The highlighted error detail does not appear related to the Service Layer.

Check the following threads:

https://stackoverflow.com/questions/43981604/how-to-update-odata-wcf-in-visual-studio-2017/55944442

https://stackoverflow.com/questions/55944985/unable-to-add-service-reference-to-odata-endpoint?rq=1

You can use oData Connected Service tool that generates code to facilitate consumption of OData services.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

rahuljain257
Participant
0 Kudos

Thank You Sir for providing the solution.

Answers (1)

Answers (1)

rahuljain257
Participant
0 Kudos

As Suggested by ankit.chauhan1 & n007praveen71 I am sharing the complete solution so it will be helpful for the community.

Step 1 - Please modify B1S.conf file [Which is the configuration file for Service Layer]

Step 2 - Change the project version to .Net Framework 4.0

Step 3 - Save as XML file.

Step 4 - Add Connected Services

Step 5 - Point the XML file reference in the Address Section

Step 6 - Click Next and you will see the below option.

Step 7 - Click Next and you will see the below option.

Step 8 - Click Next and you will see the below option.

Step 9 -

Step 10 - Final Solution