I have a WCF service running on a net.tcp port inside a hosting application running on my computer - Windows 2003 64 bit.
The application will accept connections from a colleague's machine and locally from the WCF Test Client and sends back the appropriate information. I can also use my client to connect to the service running on my colleague's machine.
Unfortunately it won't allow me to connect to the service from the client running on my machine. Client on my colleague's machine with server on colleague's machine also fails.
Confusingly, the app also runs another service which works fine locally and remotely.
This works: net.tcp://localhost:8736/EchoExcelServices/
This doesnt: net.tcp://localhost:8736/EchoExcelServices/Uploader
The exception given in the client app is a SecurityNegotiatanException with the message
The server has rejected the client credentials
Inside it (a couple of layers down) is a Win32Exception with the message
The logon attempt failed
EDIT: The behaviours section is as follows:
<behaviors>
<serviceBehaviors>
<behavior name="EchoExcelLibrary.MetadataBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="ImpersonationBehavior">
<clientCredentials>
<windows allowedImpersonationLevel="Impersonation"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
EDIT 2
altered behaviours secion:
<endpointBehaviors>
<behavior name="ImpersonationBehavior">
</behavior>
</endpointBehaviors>
This was a problem with the setup of DTC on our machines. It is now resolved
Related
I host a WCF Service in IIS, but it is giving following error:-
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
I developed this service in .Net Framework 4.0 and applied basicHttpBinding for SOAP.
I also tried aspnet_regiis.exe -i command but still my problem did not get resolved.
Http Binding is as follow:-
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServBehave">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
You need to make sure WCF is installed and enabled on the server.
Make sure that the .NET 3.5.1 Framework is installed.
Ensure that “Windows Communication Foundation HTTP Activation is enabled and installed. This can be access via the Program Features in the Control panel under “Turn Windows Features on or off”.
Execute below command from command prompt running as Administrator (elivated privileges ).
"%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i
Why is my server returning machine name instead of url with my WCF Service hosted in IIS6 on windows 2003 x86?
You can use the <useRequestHeadersForMetadataAddress> service behavior to do that:
<serviceBehaviors>
<behavior name="ServiceBehavior">
<useRequestHeadersForMetadataAddress />
</serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
We are calling a third-party service using Windows Identity Foundation. The service is called between 30-40 times successfully. But memory usage of the client application is strange. The application is consuming more and more memory at each service call. I profiled the client application and I found that there are many Dictionary<object,MruSecurityTokenCache.CacheEntry>.Entry[]
instances and each instance consumes memory. If possible then I don't want to use the cache. Is this possible?
Thank you.
The problem is solved using the configuration below:
<system.ServiceModel>
<behaviors>
<endpointBehaviors>
<behavior name="Client">
<clientCredentials>
<issuedToken cacheIssuedTokens="false" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.ServiceModel>
I have hosted a WCF service on Azure at http://voraservice.cloudapp.net/MyPushService.svc. The problem is when I connect through client, it gives me that no endpoint found at the given address:
http://rd00155d3425e0/MyPushService.svc
I dont know how this random servername came here and am trying to figure out since few hours how to remove this random server name and put the actual location of the WCF hosted on the cloud. Any pointers to solutions are appretiated!
Update: I saw this KB article - http://support.microsoft.com/kb/971842/
But when I try to update for Win7 its says hte update is not for my computer.
Initially I was redirected to this KB - http://support.microsoft.com/kb/971842/ but this dint help me on my Windows 7 machine.
Finally I was able to resolve this by adding useRequestHeadersForMetadataAddress tag inside serviceBehaviors tag.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ShoutboxWebRole.ShoutsBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<useRequestHeadersForMetadataAddress/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
...
</services>
</system.serviceModel>
May sound like a manual instruction, but please check the config of consuming application. Often it is pointing to wrong direction. Here is a similar problem discussed in this blog post http://junooni.wordpress.com/tag/azure-incorrect-address-no-endpoint-listening/
All the best.
I am trying to generate a client proxy from a WCF service library. I am using VS2005, .NET 3.0 on a Windows XP Pro workstation. The WCF service is hosted in a windows service. When I run the windows service as a console application, there are no problems. I can run svcutil.exe against that address and it generates the proxy. However, when I compile that service in release mode, and install it on the workstation using InstallUtil, I get an error "Error: Cannot obtain Metadata from net.tcp://localhost:9090/Service2 ". These are the settings I am using the app.config for the service
<behaviors>
<endpointBehaviors>
<behavior name="Test2">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata />
<!--<serviceMetadata httpGetEnabled="true" />-->
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="TestBinding2" inactivityTimeout = "00:30:00" openTimeout="00:30:00"
receiveTimeout="00:30:00"
sendTimeout="00:30:00">
<binaryMessageEncoding />
<tcpTransport transferMode="StreamedResponse" />
</binding>
</customBinding>
</bindings>
A couple of shots in the dark...
Is your Windows service running? Beyond that, is your WCF service running within the Windows service? My project is also hosting a WCF service in a Windows service (you can see the general step-by-step here). Even though I have the Windows service marked to start automatically, I still have to manually start it the first time. Perhaps there is a command-line option of InstallUtil.exe that I'm not aware of that will do this for me. But the point is, if your Windows service or your WCF service inside is not running, you obviously can't see the MEX endpoint.
The other thing I noticed. Your error says that the metadata cannot be obtained from net.tcp://localhost:9090/Service2, but the base address you posted in your comment shows
net.tcp://localhost:9090/Service_2. Perhaps this is just a type-o, but it wouldn't hurt to double-check that everything is spelled correctly, especially if the add.config is hand-generated.