Preventing WCF Test Client from running - wcf

I'm developing a WCF Service with VS 2012
I'm using IIS Express.
If I run the service the WCF Test Client appears automatically.
I don´t find anything in the VS Options that allow me to turn the Test Client off.
How can I do that?

Project > Right Click > Properties > Debug > Command line Argument
Delete /client:WcfTestClient.exe

Related

WCF self host: when I run into visual studio service works, when I run the release exe does not

I have a service that is host in a console application. when I run this application inside visual studio, the service is open and I can access from the client or when I use the uri in an internet browser.
However, when I run the exe, the service is not open and I can't acccess to the service. I have tried to run as elevated privileges, but it does not work.
Why in visual estudio works and stand alone not?
I am using VS2015 community and WCF 4.5.
Thanks.

Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

We are trying to configure continuous integration with TFS 2012. While queuing a new build, the publish fails with the error:
Build FAILED.
"C:\src\ProjectName.sln" (default target) (1) ->
"C:\src\Website\ProjectName.csproj" (default target) (2) ->
(MSDeployPublish target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): msdeploy error ERROR_COULD_NOT_CONNECT_TO_REMOTESVC: Web deployment task failed. (Could not connect to the remote computer ("ServerName") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC)**
I checked all the points mentioned in the IIS.NET documentation for this error. Both services mentioned, Web Management Service and Web Deployment Agent Service, are running fine. A restart of those services has no change in behavior.
Windows Server 2008 R2 with IIS 7.
Web Deployment Agent Service is running on port 8172.
Web Deploy 3.0
Windows Firewall is not blocking any port on the server.
How can this be fixed?
If you install Web Deploy 3.x BEFORE Web Management Tools are installed, you'll have to re-install Web Deploy. I beat my head against the wall for hours on this.
Install the Web Management Services ("Turn Windows Features On/Off"/Roles -> Web Server -> Management Tools -> Management Service)
Then uninstall Web Deploy (repair didn't work) via the usual Add/Remove Programs control panel
Install Web Deploy 3.x again using Web Platform Installer.
Fixed. /Sigh
Double check in your Web Deploy settings that the name of the website is exactly that of what's in IIS.
Ben Day blogged more about it.
Fix that i saw on another website:
Fix it by adding “http://” to server.
In other words, when server is www.xxxx.com would get the 403 error, but when server is http://www.xxxx.com, then it works.
You need also to indicate the app name e.g 'Default Web Site/MyApp'
That was my error. Once I added /MyApp, it worked.
I got this error when using msdeploy, not TFS. In my case I needed to make sure the user msdeploy is using had permission to deploy to the website.
Find the website in IIS manager, right click and go to Deploy, then Configure Web Deploy Publishing. Find the user used by Web Deploy and setup for this website.
In my case the Internet proxy was enabled on source - which made msdeploy to reach out to internet instead of local ICN.
You should check the logs on your IIS first - see that you actually get to the server, and then you can locate the exact error here - https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0
Uninstalling and re-installing (not repairing!) after setting up IIS did most of the magic for me.
There is another possible cause of the error. IIS Managemente Service have its own configuration for IP Address Restrictions, which default value is Deny Access for unspecified clients (Windows Server 2012 R2 with IIS 8.5).
You must set this value to Allow or add access to your specific IP address/IP address range using the Allow... button.
Remember, you must Stop the Management Service previously to change this configuration.

visual studio 2010 wcf debug

I have 2 virtual directory on my IIS (first for server developing and second for client devloping).
Each directory point to different folders:
c:\Server\ -> localhost/Server/service.svc
c:\Client\ -> localhost/Client/service.svc
(Whenever server "binaries" are stable I copy them to Client path)
My problem is that whenever I start debugger for server (where in VS I set "Use local IIS web server" to "localhost/Server/service.svc" ) the breakpoints are also hit form localhost/Client/service.svc (also when "binaries" are different).
I thing it is because debugger connect to w3wp.exe .
I tried to change AssemblyInfo.cs but that didn't help.
Thanks.
I assume that run both websites under the same IIS AppPool. This means that both websites run in the same process. You need to use different IIS AppPools if you want Visual Studio to debug only Server.
Also you probably have architectural issue. Usually there is no need to have the same service.svc in client and server.
Normaly you should have one Visual Studio solution with 3 projects configured as follows:
Project with Contracts (contains data and service contracts)
Server project with *.svc files
Client project that contains Server references generated for Server endpoint.
Both Client and Server reference Contracts.

How to debug a remotely hosted WCF web service

I am new to WCF web service development and I can use some help.
I have a simple web service written in C# that I'm hosting on a remote server (it's hosted on IIS 5.1).
I've written a client application for that web service that I'm running on my workstation.I am able to connect to the service without any problems.
However, I would like to be able to debug the web service.I need to be able to step through the code, set breakpoints, etc.How do I achieve that from my local machine? I'm using Visual Studio 2010.
Thank you in advance.
I see two possibilities:
Local debugging: For debugging, run your service on your local machine. If you want to run it on the local IIS, simply start a second instance if VS2010 and attach to the w3wp.exe process (menu Tools -> Attach to process)
Remote Debugging: You have to install and start the VS2010 remote debugger on the server. Start a second instance of VS2010 on your development box and connect to the remote debugger with menu Tools -> Attach to process.
See msdn for more information about remote debugging with VS2010.

Adding reference to WCF service gives error

I am having a very basic problem with creating WCF. So here is what i did
Created an ASP.NET web site project in VS2008.
Created a WCF service application in the same solution. Added a new WCF service "WCFService1.svc" into this project.
3,. Changed the setting of the Web server from "Use Visual Studio Development Server" to "Use IIS local web server".
Clicked add "Service Reference" in ASP.net web site project and clicked discover to see the "WCFService1" service. Now when I try to add Service Reference, I get an error all the time saying "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service."
But if I revert back to the "Use Visual Studio Development SErver" setting, things run fine.
Please tell me what is going on here. This is driving me nuts! Eventually the project needs to be deployed in IIS to I am surprised if no-one else cam across this problem.
The VS development server uses Anonymous Authentication by default. If you change the authentication in the Options of the virtual directory it would work.
Here I found some links that might help you.