Try our conversational search powered by Generative AI!

Basic authentication for web services


I'm having trouble with basic authentication, and web services in EPiServer 5 (5.1.422.256).


I'm running IIS7, and I think that's where the problem is. Basic auth is working, but it always redirects to the form login page, and I can't disable form login from IIS7, without disabling it in the web.config. If I do that the admin page starts behaving strangely (not downloading javascript from /Util). I have followed the documentation, but still have this problem.


Has anyone been able to get this working with IIS7?


Thanks for your help,

Jul 21, 2011 18:44

Let me see if I got this right. When you browse to the webservice you get a windows login prompt and when you enter your credentials you get redirected to a form login?

Make sure that the user in in the webservices group (defined in web.config under the webserices location) and that the group is added to "Permissions to functions" (admin mode -> config tab).

Also there is an article about configurating and troubleshooting web services: Get a Forms Login Prompt, After the Windows Login Prompt 

Jul 21, 2011 19:06


Yes that's right, I am redirected to the login form.

If I disable form authentication, and set all pages to use basic auth I am able to use the webservice without any problems. However this breaks admin mode, requests for javascript files in /Util/javascript are failing. So the actually logging in and using the webservice works fine. I just can't find a way to disable form authentication for one page, and leave it enabled for the rest. In fact I don't think this is possible.

I was under the impression that logging in with basic auth should create the required cookies and bypass the form login altogether.

I have read the document you posted and tried the following:

If you cannot get past the forms login prompt, verify that forms authentication with Windows accounts actually works. Log on to Edit mode with a local administrator account.

And this does work, I can log in to edit mode with that user.



Jul 22, 2011 9:51

What about this: "Make sure that the user in in the webservices group (defined in web.config under the webserices location) and that the group is added to "Permissions to functions" (admin mode -> config tab)."

Also, basic authentication should be disabled in IIS. Instead you use the EPiServer basic authentication module (so make sure that's added to the http modules). 

Like the document says: "You must use Integrated Windows authentication or follow the steps in Configure EPiServer CMS 5 to Enable Basic Authentication to emulate Basic authentication if you want to use both forms authentication and Web services on the same site." 

Jul 22, 2011 15:14

Sorry for my late response on this. I managed to get it working in the end, I needed to allow anonymous auth for the web services folder. Thanks for your help.

Jul 25, 2011 16:07
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.