BizTalk WCF Service and Common Schema Application - biztalk

I created a BizTalk WCF Service in BizTalk that uses a common schema. The issue is when I send a request to the service, I receive a security error. The site is anonymous authentication.
I removed the reference to the common schema and added the schema files to the BizTalk WCF service project and redeployed. I didn't receive any errors. I would think that since the BizTalk application that is transformed into a web service, has a reference to a common schema, it would be able to access it.
Does anyone know how to work around this?

Related

IIS Configuration for Rest Service Client

In Company where I work, we have an ASP.NET web application that is hosted on IIS server and binded already with CertificateA. This certificate is owned by the company.
There is another Company let say CompanyB that is providing some Rest API service based on paid subscription.
CompanyB provides subscribers with CertificateB and ask them to send CirtificateB along with the http request when invoking the Rest service.
We have subscribed and received a copy of the CertificateB.
We imported CertificateB on the server and uses Restsharp package from NuGet library to achieve the goal.
It works perfectly and get the proper response when I run the application from within Visual Studio.
However, when I publish it on IIS and run the application I am getting error says:
"The request was aborted: Could not create SSL/TLS secure channel."
Provided that both IIS and visual studio installed on the same machine.
As I said the binding of our web application is already using CertificateA.
Is there any configuration on IIS need to be done regarding CertificateB.
Thank u
I wish we get rid of this error
I got the issue resolved. All I have to do is to give the right permission to the application pool identity to be able to access the certificate.

How do I configure an ASP.net web application to invoke a WCF service host factory for named pipe calls?

I am hosting a WCF service in an ASP.net application. The service has two endpoints, an HTTP endpoint and a named pipe endpoint. I'm trying to consume the service from within the same web application using the named pipe endpoint.
The problem is that the service host factory isn't invoked until something tries to access the HTTP endpoint, so if the web application tries to call the service using the named pipe endpoint the call fails.
How do I configure the web application (or IIS) to invoke the service host factory for named pipe calls?
Update: My original premise was wrong. I took Petar's advice and installed AppFabric. This allowed me to see that the named pipe endpoint did in fact exist and that the service host factory had been invoked during an earlier build. I was able to test this by performing a clean build and setting a break point in the factory class.
Windows Server AppFabric could be your solution as it offers ability to manage service instance differently then with IIS and WAS. You can see here the screen where you can configure your services to auto start.
Beside this feature there are some other useful aspects of AppFabric you can read from the links above.

Calling WCF service from host

I am hosting a WCF service library in an ASP.net web application, which also needs to consume it. What is the best way to do so? Should I create a client proxy and invoke the service that way or is there a way of directly calling it? (the library is a project reference after all, and I guess doing so would be faster)
Since your WCF service library is a project reference for your web application, you could just instantiate the service directly without creating a client proxy. This approach would indeed be faster since you wouldn't be going through the serialization and deserialization that WCF does. However, you may wish to create a client proxy and access the service that way. This approach would be useful if there's any chance you may at some point host the service outside of your web application. If you were to end up moving the service, you would just need to update the endpoint address in your web application's web.config file.

.NET Java SOAP service change to WCF soap service

I currently have soap web services in java. Due to some architectural changes we need to move the services to WCF.
If the signatures are the same, can the string URI be changed and the .NET proxy will continue to work without any changes to the code?
If the contract (WSDL) remains absolutely the same then you only need to change address to the new server hosting the service - that is the theory. Now you need to build the WCF service which will really have the same contract. That can be hard task. I would start with generating interfaces from existing WSDL describing Java service (use svcutil for that).

Web service scenario in BizTalk server

I am new to BizTalk server and I want to know that is it possible to communicate with bizTalk like a web server? My scenario is like this.
I have a application in silverlight that will send request to biztalk (web service or http) with some parameter, biztalk will send that request to third party web service, third party web service will give response to Biztalk, this response will be sent back to my silverlight application.
Is this possible? if yes can anybody give me an article that help in creating this type of application.
Yes - Use the SOAP adapter and a web service port
Service Station from MS
You will need to create an orchestration and a map (if the schema are different between the 2 services) to handle the actual passing of Messages between the 2 web services.
First Steps in Orchestrations
Creating Maps in BizTalk
and a good guide and tutorial for Webservices here
Calling biztalk webservice from Silverlight
http://weblogs.asp.net/jgalloway/archive/2007/06/14/calling-an-asmx-webservice-from-silverlight-use-a-static-port.aspx
Yes. You can set up an HTTP Receive Port and handle straight XML messages from SilverLight and then pass back whatever message SilverLight requires (be sure to use a 2-Way Receive/Send Port). The bigger question here is why? Why not talk to the far end web service directly from SilverLight? Is BizTalk adding any value here? Are you including BizTalk as an abstractionlayer for future functionality? Is BizTalk some how enriching the messages?
My questions are the same as ChrisLoris.. Why use Biztalk here? If its just to call Service A and then B and deliver information back to the silverlight app, I would rather create acustom .net .dll to handle it. If you really want to have a workflow you can use WorkflowFoundation..
I found the solution for this problem. You need to install the certificate in the user store of the user under which biztalk host instance is running and also grant access to private key of the certificate using winhttpcertcfg tool.
1)Open the mmc using runas /user:<> mmc
and import the certificate into the user store.
2)winhttpcertcfg -g -c LOCAL_MACHINE\My -s <> -a <>
These two steps should do the trick.

Resources