I am trying to add basic authentication to my web service. I followed the steps from this article and got this in my web.config file:
<configuration>
<httpModules>
<add name="BasicAuthenticationModule"
type="Mono.Http.Modules.BasicAuthenticationModule, Mono.Http, Version=2.0.0.0, PublicKeyToken=0738eb9f132ed756"/>
</httpModules>
<appSettings>
<add key="Authentication" value="Basic" />
<add key="Basic.Users" value="/home/vadmin/Projects/TestService/TestService/users.xml" />
<add key="Basic.Realm" value="My Realm" />
</appSettings>
</configuration>
My .xml users look like this:
<?xml version="1.0" encoding="utf-8"?>
<users>
<user name="adrian" password="adrian">
<role name="user" />
</user>
</users>
When I started xsp2 and then go to
http: // localhost: 8080 / TestService.asmx
A user and password prompt will appear.. But after entering the correct user and password, he asks me again and again. I am sure that the path to the users.xml file is correct, I tried running xsp2 with the --verbose options, hoping for some error messages without any luck.
Can someone help me debug this situation?
source
share