Where SBODI_Server library is save? - sapb1

I need to create a C # project that uses the DI server library. But I do not know where the libray is saved.
I reinstalled the SDK (and enabled to add the Di server library), but when I try to add it as a reference, I do not find it.
I'm using VS2017 and SAP 9.3.
enter image description here

If it's installed correctly it should show up as a COM reference called "SAP Business One DI Server API". See https://archive.sap.com/discussions/thread/3776529
The default installation location is C:\Program Files (x86)\SAP\SAP Business One ServerTools\DI_Server
Note that if you're going to use it in a web service hosted under IIS, you have to set DCOM security to enable it to be instantiated. In Component Services it's called "SBODI_Server".

Related

Publish a WCFService doesn't work; Debugging-mode works

I want to start an default webservice-project, where I can send data over a service. When I go to debug the API through VS then everything works fine, but not when I try to use it over IIS.
I created an WcfServiceLibrary-Project in Visual Studio 2017. I then right-clicked on the project (in the solution explorer) and then published it to a folder A.
I also didn't do anything special at IIS (all the things are still on localhost.): I activated the default windows-feature "IIS". (The default web site got also stopped). Then I added there a site with an random name and the path to the folder A. The service got started.
My access trial was to find anything through Visual Studios "connected services".
Has anyone an idea?
At first, please use the WCF service application project template,
or the Appconfig file would not be kicked in. library project needs the additional configuration in the hosting environment, and the Appconfig file could not recognized. We have to move the configuration code into the configuration file recognized by your hosting environment.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/deploying-a-wcf-library-project
Secondly, for hosting the WCF service in IIS, we should enable the below windows feature.
Feel free to let me know if the problem still exists.

Registering DCOM proxy on client machine

I have a .net 2 COM+ class library. It is installed on my machine running as the host server.
The COM+ object builds and registers, and I am able to call if via VB (open Excel and using dev mode added the reference, and then can call the object without any problems).
Now attempting to deploy to our test machine. Tried the following:
Export the COM+ object as Application Proxy
Export the COM+ object as Application Proxy with "Save application in COM+ 1.0 format."
After taking the msi and cab files to the client machine, ran the MSI. There were no errors on installation.
The object does show up in the registry (searched for it by GUID). The object does NOT however show up in the DCOM Config tree (also checked the COM+ tree as well just to make sure it is not there).
Looking at the win32 file in registry for the object, it shows it pointing to c:\Program Files\COMPlus Applications\ {GUID} \class.tlb This is valid as that is where the tlb is sitting, and the GUIDs match as well.
Does anyone know how to get this to work correctly?
Additional information:
The COM+ object is built via ClassInterfaceType.AutoDual as AutoDispose and None I could not get to work correctly.

Error message from svcutil.exe - what does it mean?

I've had not a lot of luck creating a WCF service with Visual Studio. It's in IIS, and it I click 'browse' on the .svc file itself, it tells me I have created a service. So I assume it's all okay to a point.
Throughout my time I came across a recommendation to use a program called svcutil.exe. I used it on my service and got the following error. I don't know what it means, so hopefully someone can shed some light on the situation.
Here's the result:
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'http://localhost/EvalServiceSite/Eval.svc'
using WS-Metadata Exchange or DISCO.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.Se
rviceModel.Description.DataContractSerializerMessageContractImporter
Error: Schema with target namespace 'http://tempuri.org/' could not be found.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/'
]/wsdl:portType[#name='IEvalService']
Error: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is de
pendent on.
XPath to wsdl:portType: //wsdl:definitions[#targetNamespace='http://tempuri.org/
']/wsdl:portType[#name='IEvalService']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/'
]/wsdl:binding[#name='BasicHttpBinding_IEvalService']
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is depend
ent on.
XPath to wsdl:binding: //wsdl:definitions[#targetNamespace='http://tempuri.org/'
]/wsdl:binding[#name='BasicHttpBinding_IEvalService']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/'
]/wsdl:service[#name='EvalService']/wsdl:port[#name='BasicHttpBinding_IEvalServi
ce']
Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata docu
ments did not contain any valid contracts or services
or because all contracts/services were discovered to exist in /reference assembl
ies. Verify that you passed all the metadata documents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to
use the /dataContractOnly option.
I think this previous Stack Overflow question may help with your current question but not necessarily your problem.
Error: Cannot import wsdl:port with svcutil
You've created your WCF service and you've browsed to it in IIS so you're happy that it is working. The purpose of SVCUtil.exe is to generate classes that you can use in an application to interact with the service with compile time information on the contract members and methods.
it performs the exact same function as adding a service reference in visual studio to consume the service.
If your having trouble, i'd suggest just creating a simple console project in visual studio, adding a service reference and giving it the url of the service you've hosted in IIS. Then click "show all files" in the visual studio solution explorer and look at the reference.cs file it gives you. This will show you what information has been consumed from your service.
Edit
Hi Again,
After going through all the comments below I'm starting to see more about your problem. I think you misunderstand what it is your doing when in fact you've already achieved what you want to achieve.
The original project, the one you had with the WCF test client that worked did what you needed. It is a fully fledged WCF Service. All you needed to do was right click the solution in visual studio and publish it. If you then make sure that you make an IIS virtual directory point at your solution, through the publish wizard. Then when you run your project and then browse to that url, that will give you a service to consume for testing purposes.
What you are doing at the moment, creating a WCF project, adding that DLL to a website project is fundamentally wrong: The example you followed, presumably this one :
http://msdn.microsoft.com/en-us/library/ms733766.aspx
is about creating a WCF service in a web site project from scratch. Not about adding a pre-existing WCF project and hosting it.
Your essentially trying to do one thing in two different ways together.
Your current course of action is to either remove the DLL in your web project and then create the service there. Or host your current WCF service in IIS ( the project you downloaded from me or your original one)
At this point you have a hosted service. Then usually you have an application to interact wtih it. This you found using svcutil and can be done in one of two ways:
You create the console application and do "Add Service Reference" to the URL you have hosted in IIS.
Or you use SVC Util.exe point it at the url which generates a class file you include in your console / application.
I hope that clears things up about WCF and what stages to use various tools?
Edit 2
Just in case you don't get to the Chat:
I still think theres something wrong with your original project. I'm not sure what you mean by the one with the DLL either? if that means your website project with the dll of the WCF project, then no not that one.
I've taken the project I sent you earlier. I've hosed that in IIS so that when i browse to localhost/EvalService on my machine i get the standard
"EvalService Service
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:"
Once I had that set up i created a console application, "added service reference" in visual studio and it consumed teh service no problem.
Try doing the above with the project I sent you and see how far you get.

Updating Service reference WCF in VS2010 SP1 (mvc3 project) TFS -- Causes other developer failing to compile

On my local machine, I consume a WCF service via the Service References. I can add to the other WCF project and check in to TFS , run the service, Go to my main project and Click on Update Service Reference, and my web.config is fine whether change is needed or not. Rebuild is fine.
However, on another developer's machine, they make a change to the WCF Service run it, and go to main project and Update Service Reference, and sometimes the web.config get trampled, it doesn't show the Url to the wcf service etc... Thus compiling project causes a issue where it cannot find the namespace for the service reference.
Then if I get latest and checkin and tell a developer to get latest, their web.config will update, but they still increasingly have a problem with the namespace for the service reference does not exist. It is running, the update to the service works. The Url in the browser shows the endpoints.... but vs 2010 sp1 has repository files that cannot find the service reference for some reason. "Are you missing an assembly reference?" Any ideas??
If in the svcutil dialog, the option to use shared assemblies is turned on, and if any signed assemblies are not an exact match, the checked in version will fail on the other machine.
You need to make sure the assemblies used have the same public key token.

Deploy WCF REST 4.0 to XP IIS 5?

I am trying to deploy a simple "Hello World" .NET 4.0 REST-style WCF service on WinXP (IIS5). It works fine in Cassini.
I tried to adapt the info here to me:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
but something is not clicking. Can anyone lend ideas or comments? Yes, I must stay with WinXP.
Thanks.
After a fair amount of struggling I was able to successfully deploy a WCF 4.0 REST web service on XP/IIS5. For the benefit of you and others in the same situation, here's what I did (let me know if you need more detail):
Using VS 2010, build a deployment
package for the project and then
install it on the target machine
(your web server). The following
link will show you how to do this: http://vishaljoshi.blogspot.com/2009/03/web-packaging-installing-web-packages.html
Make sure that your virtual directory in IIS is configured to use .NET 4 (right click on virtual directory > properties > ASP.NET tab > ASP.NET Version)
Configure your virtual directory to support extensionless requests (i.e. your REST API) by creating a wildcard mapping (right click on virtual directory > properties > configuration > mappings tab) with the following properties:
Executable: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
Extension: .*
Check that file exists: unchecked
(Note: watch out for the bug that keeps the "OK" button on this dialog grayed out. To get around this just click in the executable textbox after entering your extension and the "OK" button should get enabled).
If you get an authentication error when accessing the service then turn off integrated authentication on the virtual directory. This should fix the problem if you have used the defaults in the generated web.config of your service. If you have explicitly modified the authentication mode then you will have to adapt accordingly.
Have you considered self-hosting your service instead of trying to use IIS. That will probably be easier to do than use IIS.
In case above steps dont work. There could be a problem with permissions on your App pool for that website / virtual directory , you can try to set that right and try it out.
You can refer this article for more help on this.
http://technicalwizardry.blogspot.in/2013/04/wcf-rest-service-hosted-on-iis-5.html#!/2013/04/wcf-rest-service-hosted-on-iis-5.html