How to register SAP Business One DIAPI in AppService in Azure - sap-business-one-di-api

I have an ASP.NET Core web API project that locally works fine with interop.SAPbobsCOM because I have in my machine all installed and registered but when I publish it in App Service in Azure I get this error
An unhandled exception was thrown by the application.System.InvalidOperationException: Retrieving the COM class factory for component with CLSID
Any idea how to register this in my App Service?
Thanks

service layer is the best option for web integration project for sap business one

This is happening becase there is no SAP B1 DI API installed, But I think that's not possible with azure app service.
Good option would be to use Service Layer instead of DI API.

Related

Azure Host WCF webrole AND MVC webrole?

I have two projects in my solution that I would like to publish to Azure as a Cloudapp.
MVC webrole, (service reference to WCF webrole)
WCF webrole
Now, is it not possible to publish two webroles in one Cloudapp? (Dah, dumb question).
If not possible, how am I supposed to use my WCF service? Am I force to publish the WCF service as it's own cloudapp!?
Perhaps it is possible to publish the WCF service as a worker role so I don't have to use two cloudapps for this?
Currently everything is working great locally. I have added a service reference in my MVC project pointing to my WCF service and I'm able to use the functions that resides in there.
The problem is that the WCF webrole doesn't get published, (just the MVC webrole). I can't access the WCF service, (The resource cannot be found).
Do you have any suggestions on how I can implement my WCF service when published without too much of a hassle?
Thanks
Host your WCF service in a worker role. Thank you, Coder1409!
Heres a follow up question:
Host WCF in the Worker Role, Timeout

Can't access Newly Added WCF Methods in Web Application

I am developing an Web application using WCF. I have added Web Reference in Web Application. I am adding methods in WCF as per my need then updating Web Reference in Web Application and it is updating successfully but can't access the newly added methods of WCF in Web Application.
Please Help me...
Do your new methods exist in the contract interface, and do they have the OperationContract attribute?
When you update the web reference, is it looking at a test service or your newly-modified service?
Are you running the modified service when you update the web reference, or is it that the old version of the service is running under an ASP.NET process (check your taskbar) and that is what you are updating from?
Have you rebuilt the client after updating the web reference (I know, I know, but easily missed)?
Yes I did it.
I just deleted Web Reference from Web Application and then cleaned the solution of WCF and Web Application. After that Build Solution of WCF. Then added WCF Reference through "Add Service Refeence" then Build Solution of Web Application. In this way solved my problem.

how to call oracle web service using asp.net web service

How to call Oracle web service using asp.net web service? Is there a difference between calling asp.net web service and calling Oracle web service from asp.net web service?
I found how to call asp.net web service from another one but not Oracle
If the web service (any web service) has a WSDL, then you can call it from .Net code. Just point the WCF Configuration utility at the URL, or import the WSDL and it will generate the proxy for you.

Difference between Window Service, WCF Service application and ASP.NET web service application?

I don't know this is a right forum for my question or not?
I am new in Web Services. Today i just open VS2008 and found 3 type of SERVICE project
Window Service
WCF Service application
ASP.NET web service application
Please help me to find out the difference between these three projects?
When should we decide which type of project?
Very short explanation:
Windows service is as it states a service running on Windows OS. For example, indexing service running on Windows machine is a Windows service.
Asp.NET Web Service is a service that can only be used via http and is hosted on server.
WCF is a framework, layer or platform that enables you to create multiplatform services that can communicate with each other. WCF services supports more protocols. Can be hosted by server, application or used by other services. You can use WCF to create a web service or a windows service.
A newer and easier approach for creating lightweight web services is the stateless Web API. I suggest you download VS 2017 Community Edition, so you are not stuck with only those choices.

.NET and webservices: how?

Im trying to make a webservice in ASP.NET and get the data in a Smart Device Application.
I have the standard HelloWorld webservice and i wanna get the data in my application, but when i try to add a web reference to my project, Visual Studio can't find any webservices running. If i start the WebService in the WebService project and copy/paste the url to the "Add WebReference" in the Application project, Visual Studio finds the Webservice and i can use the InttilSence to find the HelloWorld Method (WebServiceClass.HelloWorld()) in the WebService. But when i then run the Application project the complier gives an error saying that it can't connect to the WebService.
How do i do this? How do i access a webservice in an Application project? Every tutorial or book i have read about the subject doesn't tell anything about how the webservice should i run. In my world the webservice project should be running before i can access it from another project or am i wrong?
Consider reading Rick Strahl's Creating Web Services with .NET and Visual Studio.
From there, you'll get the basics. You can build and deploy your XML SOAP web service.
Then you'll need to have your application use that web service as a 'Web Reference'. Start by "Add Web Reference".
(source: usaepay.com)
First, you should publish the web service to some server (even your own local IIS) rather than using the Visual Studio web server.
Then in your application, point to the correct URL wherever you published it when adding the reference.
While this is a bit low-tech, couldn't you create a web requrest from the Smart Device Application to hit the webservice directly? That would be my suggestion.
An example would be using the "WebRequest" Class.
It sounds like when you try to access the Web Service from your app, the service is not running (possibly because you're only running it in the Cassini server?).
The fact that you were able to generate the Web Reference means that at some point, the service was running and was able to generate the helper classes by examining the service.
I would do as David Stratton suggests and publish it somewhere where it can run while you are developing the Smart Device app (like your local IIS).
You might also take the opportunity to wrap the service call with some error handling - maybe catch the specific exception being thrown (System.Net.WebException?)

Categories

Resources