Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Browser authentication dialog when HTTPService fails with a 401 response code

Avatar

Avatar
Level 1
cybersnl
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
cybersnl
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
cybersnl
Level 1

12-12-2008

I am using a HTTP Service to talk to a third party API and
passing username/password in HTTP Basic Auth header.

When i enter wrong credentials through my application, as
expected i get a 401 unauthorized response. But before the fault
handler gets called, my browser shows the authentication dialog
asking me to re-enter the username/password.



It happens on safari and firefox browser on OS X. I have not
checked other environments.



Is this expected? I do not want the browser to show me an
authentication dialog and want my application

to handle the 401 error.



thanks,

Sunil

Replies

Avatar

Avatar
Affirm 1
Level 2
Zee_Yang
Level 2

Likes

0 likes

Total Posts

29 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile

Avatar
Affirm 1
Level 2
Zee_Yang
Level 2

Likes

0 likes

Total Posts

29 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile
Zee_Yang
Level 2

13-12-2008

this is really a browser issue outside the scope of data
services. my best guess is to use javascript in the html wrapper to
silence the 401 responses.

Avatar

Avatar
Level 1
terakus
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
terakus
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
terakus
Level 1

15-12-2008

Is there any way to catch the 401 header response from HTTP
service or repress air from showing it? Using JavaScript will solve
the problem but I prefer to keep it all in AS if possible.

Avatar

Avatar
Level 1
Daniel_McQuille
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
Daniel_McQuille
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
Daniel_McQuille
Level 1

23-10-2010

Having same problem trying to do BASIC authentication via HTTPService. Any thoughts on how to suppress dialog after a 401 is returned from server on a HTTPService request?