Can you export protocol types to instal on the live enviroment? - wcf

We have successfully setup our first interface on our development environment. when we try to put this live, we get an error stating that "Protocol type "WCF-Custom" not found.". At first we tought this was due to the adapter not being installed on the live but we assured ourselves that this is the case. the only diffrence between the two enviroments now is the fact that we deployed to the test one and are importing the exported msi on the live. Is there a way to also import this protocol?

This is most often caused by not having the WCF Adapter installed. It may be worthwhile to go and and uninstall and reinstall it.
Note also that you have to both import the MSI file into BizTalk and run the MSI file on the live server.
Lastly, verify in the BizTalk Server Administration Console that the WCF-Custom adapter is assigned to a valid BizTalk host, which has a host instance assigned to it. The adapter needs to have a handler for both send and receive.

Make sure the adapter is visible under Platform Settings - Adapter. If it is not there, add it.(After running all the MSI's to install the adapters.) This is what I had to do to get rid of this error. (Except mine said it could not find WCF-SQL in stead of WCF-Custom.)

Related

How can I restart the Jitterbit UI Console?

I have Jitterbit Cloud Data Loader on a server and it was working fine for years. After the last update I cannot open anymore the UI console and cannot uninstall/reinstall the service "Jitterbit Cloud Data Loader Apache Server". When I try to uninstall it shows The system cannot find the file specified. : AH00436: No installed service named "Jitterbit Cloud Data Loader Apache Server" and when I try to install it says: The name is already in use as either a service name or a service display name. AH00370: Failed to create the "Jitterbit Cloud Data Loader Apache Server" service.
Does anyone has seen this problem before?
Tried to install and reinstall, but nothing so far, I don't want to lose my info/configuration of the processes so far...

Biztalk WCF won't show up custom behavior

I created a custom behavior for BizTalk in order to connect to an API with Oauth authentication.
I did these steps :
I added it to the GAC
Added the lines in machine.config (both)
restarted IIS, Biztalk admin console
I can even see it with SvcConfigEditor.
However when I create a WCF-Custom and try to add the Behavior, it is actually nowhere in the pick list.
Any idea please?
So....yes, it does work, but WCF being...well...WCF...
You do have to restart the machine. I don't recall ever getting this to work without doing so.
Then just keep checking the registration against other examples. Eventually, you'll get it.
Import your behaviour extension in Adapter Handler level.
In your biztalk administration console, go to Adapters -> Select the adapter and click the Handler Properties and import your extension.
Hope this helps.

How to restart a service after PackageGroup in the Chain element

I'm trying to add TeamViewer to my Chain in the BootStrapper. One of the request was that I had to install TeamViewer Silently with no UI but with certain features enabled. After talking to TeamViewer support, they told me to export my registries from my TeamViewer on the target machine, then restart the teamViewer Service.
So I extracted the reg file, use heat to harvest the entries, and created an MSI that pushes the reg values on the target machine.
The next step that I need to do, is restart the teamViewer service.
How do I do that since I'm not installing the service. I looked at RestartResource but didn't find any samples of what I wanted to do, I'll keep searching hoping to find help ...
EDIT
I'm currently testing
<util:RestartResource Id="rrTeamViewerService" ServiceName="TeamViewer9"/>
Rob?
You can use the ServiceControl element in your MSI to control a service you haven't installed.

WCF service operations not updated

I´m creating a new WCF service. I initially had only three operations. But after some time I decided to add two more. This operations doesn't appear in the Microsoft test client, neither in the list of operations when I try to add a service reference from my WPF client. Also I tried to comment one of the initial operations. It still apears in the Microsoft test client and can be invoked. I Tried also delete the dlls generated by the service and regenerate again. No luck. There are some kind of "cache" where Visual Studio stores the WCF services libraries that I can delete?
UPDATE: I'm working with the service running in the ASP.NET devolopment server.
You need to understand the order in which things happen.
You change your code, adding methods with [OperationContract] on them, or removing them, or changing their parameters or return values.
You then must build your service, producing a .DLL that contains the changes.
You must then deploy the changed DLL to the server it's going to run on
You must then restart the service (this may happen automatically depending on the server. For instance, IIS will recycle the service when it sees that the DLL changed)
You must then update your client, either the WCF Test Client, or "Add Service Reference", or the equivalent.
This last will have the effect of sending a request to the service for the new metadata or WSDL. Only then can the client see the changes you made to the definition of the service.
I don't know why, but I created a new project and copied the definitions of the operations from the problematic project and the problem is gone. One case more for Microsoft mysteries.
Make sure you are updating the services after adding the new operations.
Also make sure they have the attribute [OperationContract].
One thing we have discovered is that when you deploy the dlls that they must be in the bin, and cannot reside in the debug or release folder.
For me worked: just rebuild the wcf project
Did you close the client connection in client side
as showing your service
class Test
{
static void Main()
{
LocationClient client = new LocationClient();
// Use the 'client' variable to call operations on the service.
// Always close the client.
client.Close();
}
}
SOLUTION HERE :
Make sure your dataContract does NOT contain any enum
(You can use integer instead)
Be sure to reference a project in the solution and not a dll on your disk
Remove your "bin" and "obj" folders
Recompile
In IIS recycle the application pool
In IIS restart your service
In IIS "Browse" your service
=> You got it

Update service reference not working

I'm using Visual Studio 2008 and have a WCF client working against a WCF service. They are both located in the same Visual Studio solution. After I've made a change in my WCF contract, I want to update the service reference on the client so that changes made to the contract is also made in the proxy.
My problem is that the proxy code is not re-generated.
When I select to update the service reference, the following happens:
A dialog with the title "Updating service reference 'name-of-reference'" is shown. This dialog has a progress bar.
The progressbar moves and the status text in the dialog is changed to "Updating configuration"
The progressbar moves a bit more, and the status text is chnaged to "Configuration update complete"
The dialog doesn't show the text "Generating \something\" (can't remember the exact wording) which I would expedct.
If I delete the service reference and add it again, the proxy is properly generated. I add the service using the exact same settings as before, so I don't think it's a issue I can solve by changing the service reference configuration on the client.
One thing I suspect may be the problem is that I've renamed the default wsHttpBindings in app.config. I've also renamed the default endpoints. The reason behind this is that I need more than one endpoint and having one named 'some-default-name' and one with my own name is just confusing.
The problem with deleting the service and adding it again is that Visual Studio adds a new binding in app.config (among other things) which should not be there.
Anyone seen this problem before? Anyone knows of a solution to it?
When we have had this problem it has usually been one of these errors:
The size of the contract has increased, and is now so large that the WCF configuration does not allow it to be transferred.
A new class has been added to a WCF Interface and that class is not marked as serializable.
There is a compile error that stops the code from building and it therefore uses the old dll
I've run into this problem with the following conditions:
Our workstations are connected to an Active Directory domain (nearly everything uses Windows Authentication)
The service reference I'm trying to update is hosted on localhost, and is running under IIS Express (so the Application Pool user is running as the developer's personal domain user account)
Another developer has added or updated the reference to the project more recently than me.
The only way I have figured out how to workaround this issue is to edit the configuration.svcinfo file for that service reference (you will need to show all files for the project to see it in visual studio), locate the following section:
userPrincipalName value="user#domain.com"
and change the user to my own domain user. After saving the file, I have no trouble updating the reference until another developer updates the service reference (likely using the same workaround). Unfortunately, I haven't been able to figure out a permanent solution to this issue.
My error was that I forgot to add the OperationContract attribute.
In my case the problem was that the previous developer had added the service reference using his machine name rather than localhost. So when I told Visual Studio to update, it connected to his machine, which did not have the changes. I modified the service reference files and replaced his machine name with localhost and it was able to update the reference.
I had this problem too. Deleted the service reference and recreated it again.
My problem was that I had two methods with the same name. Everything builded fine, but I couldn't update service reference. When I tried to start just the WCF service, the error pops up.
Two easy steps to solve that:
Run Service, then stop it.
Update service reference.
Highlight the service as the active project, F5 to run it in VisualStudio, it will start up in the service test app. Stop debugging. Then try to update your service reference - worked for me.
I know this solution is a bit late, but after trying the posted solutions with no success, this worked:
When you create a WebService, it generates a .dll file that you reference as your service reference. This .dll is (as most know) not recreated everytime you make changes to the .SVC file. You can see this if you go and view the date modified property of the web service .dll file, in my case it was three hours old!
My solution was to make appropriate changes to the service contact, save it, and re-build the project which will cause it to recreate all the .dll's reflecting the changes you made to the service contact file (.svc).
After this, update the service reference on the client app, and the changes are evident.
Spades
I had the same problem. Modified some of the data contracts. Tried to "Update Service Reference" and did not see the change. Dropped and re-added the service. Still didn't see the change when writing code in the client. Opened my client with Reflector and saw the service types had the change! So why was intellisense still showing old properties? Restarted Visual Studio and the modifications finally showed in intellisense.
I had the same problem, this by me it was caused by GIT Merge Conflict, i was missing the following code from my csproj file
<ItemGroup>
<None Include="Service References\<SERVICE NAME>\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
</ItemGroup>
I have added this onder the line of Reference.svcmap
Another solution to these kinds of problems is if your namespaces get jumbled in referenced projects that both consume the service. So:
ProjectA - Consumes ServiceA
ProjectB - Consumes ServiceA, Has Reference to ProjectA
If you change ServiceA and update ProjectB, sometimes the namespaces can can change to look at ProjectA's version of the service.