Enable 'Basic' on visual studio hosted IIS authentication - wcf

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.

Related

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'.

Authentication error during acess WCF service through IIS 5

I have hosted a WCF service in my local machine(XP SP3) lets name as PushService, I am consuming this service in PushServiceClient. When I keep PushService project in running mode and try to push data from PushServiceClient I am able to Push the Data(DB is in another machine). When I stop PushService project in VS 2010 and Consume PushService hosted through IIS then I am not able to Push the Data.I am facing Authentication error during connect to DB. I am not getting where its going wrong.
IIS Version: 5.0
Permission in IIS : Anonymous Acess
Binding: WSHttpBinding(Tried Basic http also)
Security mode: None
Thanks in advance,
Manjunath
Does IIS worker process have permission for database access? Impersonating the host would solve your problem.
This is due to lack of Permisswion to acess the DB, If using IIS 5.1 then in coding set it to take Default credentials if its in IIS 6.0 (Windows server 2003) set it to take local Identity in IIS AppPool. I will get back with full details on it.
Thanks Guys for your reply.
Manjunath

Debugging WCF service hosted in IIS 6.0 using Visual Studio 2005

I've created a WCF service selecting 'WCF Service' in installed web site templates in VS2005. I've added a ASP.Net client for the service in the SAME solution. I published the WCF service in IIS 6.0 and configured it to run in .Net Framework 2.0.
I did an IISAPP in command prompt and identified the PID of the w3wp.exe process of my service application in IIS. I attached the debugger in VS to that process and started a new instance of the asp.net client project.
But i'm not able to step in to the service and the breakpoint is not enabled at all showing 'No symbols have been loaded'.
Any insights on this? Can i debug a WCF service hosted in IIS 6.0 using VS 2005 where the service and client resides under SAME solution?
Thank you
NLV

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.

Visual Studio .NET has detected that ASP.NET applications and services are locked down in IIS

Getting this error when try to compile a .net 1.1 website:
Visual Studio .NET has detected that ASP.NET applications and services are locked down in IIS. You can run the IIS Security Lockdown Wizard to change lockdown status
How I "unlockdown" it in IIS6, where is this fabled IIS Lockdown wizard?
Found this answer, it's located on msdn here in short
Open IIS6
Click "Web Service Extensions"
Change ASP.NET v1.1.4322 from prohibited to allowed