Polly Anna
New member
- Joined
- Apr 26, 2007
- Messages
- 4
- Programming Experience
- 5-10
Hi,
I have a web service on my machine that works just fine. However when another user uses it, it generates the following access error -
The request failed with HTTP status 401:Access Denied.The request failed with HTTP status 401:Access Denied.
In IIS I have set the Web Service to allow Anonymous Authentication - see below
I have also put some settings in my config file - see below - which I have changed to see if it would make any difference.
Then in the code that uses the Web Service my colleague has put the following lines of code before the Web Service is used-
Dim objAbcPdf As New ABCPdfWebService.ABCPdf
With objAbcPdf
.PreAuthenticate = True
.Credentials = System.Net.CredentialCache.DefaultCredentials
.DoSomething(txtId.Text)
End With
I really would be grateful for any help on this.
Kind Regards,
Polly Anna
IIS settings -
> Right Click > Properties > Directory Security Tab > Edit Button
then checked the Anonymous Access check box, where the User name is automatically set to 'ANYONE' and a password is automatically set with the 'Allow IIS to control password' also automatically checked. Then the 'Integrated Windwos Authentication' check box is also checked.
Web config settings -
Then in my config file I have the following settings -
<authentication mode="Windows"/>
<authorization>
<allow users="*"/>
</authorization>
<identity impersonate="true"/>
I have a web service on my machine that works just fine. However when another user uses it, it generates the following access error -
The request failed with HTTP status 401:Access Denied.The request failed with HTTP status 401:Access Denied.
In IIS I have set the Web Service to allow Anonymous Authentication - see below
I have also put some settings in my config file - see below - which I have changed to see if it would make any difference.
Then in the code that uses the Web Service my colleague has put the following lines of code before the Web Service is used-
Dim objAbcPdf As New ABCPdfWebService.ABCPdf
With objAbcPdf
.PreAuthenticate = True
.Credentials = System.Net.CredentialCache.DefaultCredentials
.DoSomething(txtId.Text)
End With
I really would be grateful for any help on this.
Kind Regards,
Polly Anna
IIS settings -
> Right Click > Properties > Directory Security Tab > Edit Button
then checked the Anonymous Access check box, where the User name is automatically set to 'ANYONE' and a password is automatically set with the 'Allow IIS to control password' also automatically checked. Then the 'Integrated Windwos Authentication' check box is also checked.
Web config settings -
Then in my config file I have the following settings -
<authentication mode="Windows"/>
<authorization>
<allow users="*"/>
</authorization>
<identity impersonate="true"/>