cancel
Showing results for 
Search instead for 
Did you mean: 

You are not connected to a Company

Former Member
0 Kudos

Hi,

we are implemented projects in Visual studio ,one is for User Interface using MVC and another one is Web service. This service will get the information from UI and create a invoices in SAP.

I have configured Application pools and web sites in IIS,

by using IIS i am getting the error 'You are not connected to a company',

but executing projects from Visual studio it is creating invoices fine.

Thanks and Regards,

Aravind.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Aravind,

Problem is not IIS.

i think May i know..

you are adding document in DIAPI or DI server.

Thanks,

P.T.sampath.

Former Member
0 Kudos

Thanks to all,

I resolved my Issue,

just i added SAP Server windows login user credentials in IIS App pools.

Now i am able to create Invoices using my web application.

Former Member
0 Kudos

Hi Aravind,

Are you using DI API or DI Server?

Former Member
0 Kudos

Hi Aravind,

Check the http://localhost/B1WS/WebReferences/LoginService.wsdl.

becoz its only connecting to sap b1 through web service.

***

<s:enumeration value="dst_MSSQL"/>

<s:enumeration value="dst_DB_2"/>

<s:enumeration value="dst_SYBASE"/>

<s:enumeration value="dst_MSSQL2005"/>

<s:enumeration value="dst_MSSQL2008"/>

<s:enumeration value="dst_MSSQL2012"/>

<s:enumeration value="dst_MAXDB"/>

***

check the "dst_MSSQL2012" if not please add and then check it.

I hope it will help..

Thanks & Regards,

P.T.Sampath

Former Member
0 Kudos

HI Sucharitha,

I am using DI API,

The code which i written is working from Visual studio,

After Publishing this project, I have configured IIS in windows 2012 server,

if i use this project from IIS then it is showing 'You are not connected to a company',

I don't know is any more settings required on IIS.

Can you please help me,

Former Member
0 Kudos

Hi,

Did you debug the line which make the connection?


int errorCode = company.Connect();               

if (errorCode != 0)                                      

{                 

     company.GetLastError(out errorCode, out lastException);

}

Check the errorCode and lastException

Former Member
0 Kudos

Please post your code on how you connect to SBO Company.

Former Member
0 Kudos

connecting to SAP using this code      

  private const string sapServer = "192.168.64.4";

        private const string sapLicenseServer = "192.168.64.4:30000";

        private const string sapDatabase = "TEST";

        private const string sapUser = "manager";

        private const string sapPassword = "open";

        private const string dbUser = "sa";

        private const string dbPassword = "pass1234!";

        private const DB_TYPE dbServerType = DB_TYPE.MSSQL_2012;

Former Member
0 Kudos

Hi

Code is not a problem because same code is working from visual studio, the problem with IIS, After publishing the Project, i am trying to create invoice from browser with ip address and port number, from this it is throwing 'you are not connected to a company'