Adding reference to WCF service gives error - wcf

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.

Related

WCF Web Service : How to run?

Am planning to build a WCF Web service using Visual Studio 2015. I came up with a sample web service that i can launch from visual studio and this works fine when i call the APIs from browser on local host.
Now i want to deploy it in a server. Am not sure how I can deploy in a server. The final out put of the web service is a DLL.
Can someone explain to me how to deploy this in a Windows server?
Do i need to run this web service DLL as a service?
Does it got anything to do with IIS?
As per your request, I have made this an answer.
If you're looking to host a WCF service which is exposed to the outside world then the best solution is to host the service via IIS which you can find out how to do by reviewing the following article.
You can find a more visual tutorial here.
If you encounter errors after publishing to IIS then please refer to the following StackOverflow answer to see which Windows Features must be enabled.

How to get Web API to deploy automatically upon building, like WCF services

I would like to achieve, with Web API, the following WCF behaviour:
Using Visual Studio 2015 create a brand new WCF Service Application. Build. Right away the sample service is "online" and can be accessed with a browser, Fiddler, etc. I do not need to explicitly run the project in VS for the services to be available to any client.
I'm completely new to Web API, and have not seen any documentation on how to achieve this same seamless deployment.
Anyone?
Instead of running the project in Visual Studio (which spins up an IIS Express instance), make sure the IIS feature is turned on on your windows installation, and setup a new site, and point it at the directory of your build output.
For a step-by-step see: http://www.c-sharpcorner.com/UploadFile/2b481f/how-to-host-Asp-Net-web-api-on-iis-server/

Lightswitch Deployment (Visual Studio 2013) Tier-3 with No Authentication

I am attempting to deploy a simple lightswitch application (HTML not Windows app) in VS 2013. I have selected to not have authentication to make the testing easier.
The IIS server and the database server are on different machines. I have followed the steps here for server setup.
However, when I go to the website after publishing, I get this error:
You do not have permission to view this directory or page.
I went to the IIS server and made sure that only Windows authentication was enabled on the application that was sent over. After reading another MS article on the 401 error, they recommended unchecking the Kernel Mode Authentication. That only prompted a username/password request, which did not work.
What am I doing wrong here? I assumed having no authentication setup in the deployment would make the website open to anyone on our network. Not the case?
Found the problem(s) with this one.
Problem #1
When I downloaded / installed Microsoft's Web Platform Installer on my IIS server, the LightSwitch application I was working on and several other seemingly random websites/apps in the IIS all had the Authentication settings disabled for every authentication type (Anon, Basic, Windows, Forms, etc.). Had to go and Enable windows authenication on several websites. Did not expect that...
Problem #2
HTML Client folder was not loaded on the machine for some reason. Removed Lightswitch app from IIS and deleted the folder. Created a package for install in VS2013 and then copied the zip file over to the IIS server. Flawless install after that... One thing to watch for it to change the default setting in IIS from 'default.htm' to 'default.aspx'.

Enable 'Basic' on visual studio hosted IIS authentication

I've created a 'WCF Service Application' in Visual Studio 2013 on Windows 8 and then set the .svc file as the default page. When I hit F5 to debug, WCF Test Client tells me that The authentication schemes configured on the host ('Anonymous') do not allow those configured on the binding 'BasicHttpBinding' ('Basic')
I've gone into the control panel and for IIS enabled Basic on the authentication types, but that doesn't seem to be what's required.
Any pointers as to how to fix this would be greatly appreciated!
Running with VS apparently uses IIS express. To enable Basic authentication, just edit the file %USERPROFILE%\Documents\IISExpress\config\applicationhost.config and set the basicAuthentication enabled to true.

Unable to launch solution: MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found

When trying to launch solution, I receive the following error:
error : The Web Application Project MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found.
How do I resolve this issue?
I opened IIS and set the TCP port on the Default Web Site to 64646 and the project loaded without error.
You need to install IIS on your development machine.
Using IIS you'll also need to run Visual Studio in Admin Mode as well.
It is recommended that you use IIS Express since it will allow you to run VS without Admin privileges.
You have to install IIS and create the web site in IIS with the matching port number. Someone else created the visual studio web project to use IIS and configured it on their computer. Each person who opens the solution has to have all the websites configured in IIS manually.
You might consider creating a script that auto-creates them in the source repository. You can do it using AppCmd.exe (ADD SITE, ADD APPPOOL, LIST APPPOOL, LIST SITE) (%windir%\system32\inetsrv\AppCmd.exe).