473,240 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,240 software developers and data experts.

IIS Webservice unauthorised access

Hi all,

We have a web application that uses web services for data access and
retrieval. The web app and web services reside under IIS on the same
server(WIN2003). The virtual directories have been set for windows
authentication and both the ASP web application and the web services are
using windows authentication with impersonation of the logged on user. We
also set the web service credentials to CredentialCache.DefaultCredentials.

Web application access in general is fine, but, when the web app calls the
web service we get a 401. Unauthorised access. Add the web site to either
intranet zone or trusted sites and all access is OK. (which suggest zone
settings but I cant find the setting causing the security problem.)

There is also another odd thing... If you browse to the web service via the
IIS console, enter the credentials, the web service access is fine even if it
is not in trusted sites or intranet zone???? Therefore the issue seems to be
with the app passing credentials to the web service but why adding to trusted
or intranet zone should rectify the problem - I'm confused......

Anyone got any ideas why? Is there a security setting I should be setting
somewhere. Any info would be appreciated.
Nov 23 '05 #1
4 3557
Pete,

We have had some problems with authentication in the Intranet zone as well.
It may be worth checking the IE setting under the Security tab to ensure that
the User Authentication is set to 'Automatic logon only in Intranet zone'. It
may also be that the URL is not always being recognised as an Intranet
location, on advise from MS we have had to use Group Policy to distribute a
list of URL's to IE that it must recognise as Intranet locations which seems
to have solved our problems.

"TrinityPete" wrote:
Hi all,

We have a web application that uses web services for data access and
retrieval. The web app and web services reside under IIS on the same
server(WIN2003). The virtual directories have been set for windows
authentication and both the ASP web application and the web services are
using windows authentication with impersonation of the logged on user. We
also set the web service credentials to CredentialCache.DefaultCredentials.

Web application access in general is fine, but, when the web app calls the
web service we get a 401. Unauthorised access. Add the web site to either
intranet zone or trusted sites and all access is OK. (which suggest zone
settings but I cant find the setting causing the security problem.)

There is also another odd thing... If you browse to the web service via the
IIS console, enter the credentials, the web service access is fine even if it
is not in trusted sites or intranet zone???? Therefore the issue seems to be
with the app passing credentials to the web service but why adding to trusted
or intranet zone should rectify the problem - I'm confused......

Anyone got any ideas why? Is there a security setting I should be setting
somewhere. Any info would be appreciated.

Nov 23 '05 #2
Paul,

Thanks for the reply, we do have auto logon in intranet zone etc. but our
problem is the reverse - if not in intranet zone or trusted zone get
unauthorised, add the site to intranet or trusted and authentication works??

We have already had some issues with authentication specifically with
Windows authentication where host headers are used. If the host header doesnt
match machine netbios name, then windows authentication fails. Resolution in
this case is to use setspn from toolkit to add special names for Server in AD
that matches the host header.

Pete

"Paul Hasell" wrote:
Pete,

We have had some problems with authentication in the Intranet zone as well.
It may be worth checking the IE setting under the Security tab to ensure that
the User Authentication is set to 'Automatic logon only in Intranet zone'. It
may also be that the URL is not always being recognised as an Intranet
location, on advise from MS we have had to use Group Policy to distribute a
list of URL's to IE that it must recognise as Intranet locations which seems
to have solved our problems.

"TrinityPete" wrote:
Hi all,

We have a web application that uses web services for data access and
retrieval. The web app and web services reside under IIS on the same
server(WIN2003). The virtual directories have been set for windows
authentication and both the ASP web application and the web services are
using windows authentication with impersonation of the logged on user. We
also set the web service credentials to CredentialCache.DefaultCredentials.

Web application access in general is fine, but, when the web app calls the
web service we get a 401. Unauthorised access. Add the web site to either
intranet zone or trusted sites and all access is OK. (which suggest zone
settings but I cant find the setting causing the security problem.)

There is also another odd thing... If you browse to the web service via the
IIS console, enter the credentials, the web service access is fine even if it
is not in trusted sites or intranet zone???? Therefore the issue seems to be
with the app passing credentials to the web service but why adding to trusted
or intranet zone should rectify the problem - I'm confused......

Anyone got any ideas why? Is there a security setting I should be setting
somewhere. Any info would be appreciated.

Nov 23 '05 #3
Pete,

That's what I was trying to say, there seem to be some circumstances when IE
fails to correctly identify a location which should be in the intranet as
actually being in the intranet so you have to force the issue and tell it
explicity. Do you use a configuration script for your IE proxy settings?

"TrinityPete" wrote:
Paul,

Thanks for the reply, we do have auto logon in intranet zone etc. but our
problem is the reverse - if not in intranet zone or trusted zone get
unauthorised, add the site to intranet or trusted and authentication works??

We have already had some issues with authentication specifically with
Windows authentication where host headers are used. If the host header doesnt
match machine netbios name, then windows authentication fails. Resolution in
this case is to use setspn from toolkit to add special names for Server in AD
that matches the host header.

Pete

"Paul Hasell" wrote:
Pete,

We have had some problems with authentication in the Intranet zone as well.
It may be worth checking the IE setting under the Security tab to ensure that
the User Authentication is set to 'Automatic logon only in Intranet zone'. It
may also be that the URL is not always being recognised as an Intranet
location, on advise from MS we have had to use Group Policy to distribute a
list of URL's to IE that it must recognise as Intranet locations which seems
to have solved our problems.

"TrinityPete" wrote:
Hi all,

We have a web application that uses web services for data access and
retrieval. The web app and web services reside under IIS on the same
server(WIN2003). The virtual directories have been set for windows
authentication and both the ASP web application and the web services are
using windows authentication with impersonation of the logged on user. We
also set the web service credentials to CredentialCache.DefaultCredentials.

Web application access in general is fine, but, when the web app calls the
web service we get a 401. Unauthorised access. Add the web site to either
intranet zone or trusted sites and all access is OK. (which suggest zone
settings but I cant find the setting causing the security problem.)

There is also another odd thing... If you browse to the web service via the
IIS console, enter the credentials, the web service access is fine even if it
is not in trusted sites or intranet zone???? Therefore the issue seems to be
with the app passing credentials to the web service but why adding to trusted
or intranet zone should rectify the problem - I'm confused......

Anyone got any ideas why? Is there a security setting I should be setting
somewhere. Any info would be appreciated.

Nov 23 '05 #4
I see - I was missing your point.....

What you are saying, please correct me if I am wrong....

You shouldn't have to add to intranet zone, IE should automatically detect
that it is intranet, you shouldn't have to force the issue by adding to
intranet zone.

We dont use configuration scripts for IE, and we dont use a proxy......

Just a little 'aside' - if this wasn't an intranet site, but a live outward
facing site, but access to the site was using windows authentication, ie.
site designed for staff access from external clients, then IE wouldn't detect
that it is in the intranet zone as it isnt, but the scenario I have described
would still require adding to trusted site before web services authenticate
properly. Is it that credentials are only automatically sent (depending on
setting) if you are in intranet zone or trusted site and no credentials are
sent for internet zone (even with the automatic logon with current username
and password - setting set)

"Paul Hasell" wrote:
Pete,

That's what I was trying to say, there seem to be some circumstances when IE
fails to correctly identify a location which should be in the intranet as
actually being in the intranet so you have to force the issue and tell it
explicity. Do you use a configuration script for your IE proxy settings?

"TrinityPete" wrote:
Paul,

Thanks for the reply, we do have auto logon in intranet zone etc. but our
problem is the reverse - if not in intranet zone or trusted zone get
unauthorised, add the site to intranet or trusted and authentication works??

We have already had some issues with authentication specifically with
Windows authentication where host headers are used. If the host header doesnt
match machine netbios name, then windows authentication fails. Resolution in
this case is to use setspn from toolkit to add special names for Server in AD
that matches the host header.

Pete

"Paul Hasell" wrote:
Pete,

We have had some problems with authentication in the Intranet zone as well.
It may be worth checking the IE setting under the Security tab to ensure that
the User Authentication is set to 'Automatic logon only in Intranet zone'. It
may also be that the URL is not always being recognised as an Intranet
location, on advise from MS we have had to use Group Policy to distribute a
list of URL's to IE that it must recognise as Intranet locations which seems
to have solved our problems.

"TrinityPete" wrote:

> Hi all,
>
> We have a web application that uses web services for data access and
> retrieval. The web app and web services reside under IIS on the same
> server(WIN2003). The virtual directories have been set for windows
> authentication and both the ASP web application and the web services are
> using windows authentication with impersonation of the logged on user. We
> also set the web service credentials to CredentialCache.DefaultCredentials.
>
> Web application access in general is fine, but, when the web app calls the
> web service we get a 401. Unauthorised access. Add the web site to either
> intranet zone or trusted sites and all access is OK. (which suggest zone
> settings but I cant find the setting causing the security problem.)
>
> There is also another odd thing... If you browse to the web service via the
> IIS console, enter the credentials, the web service access is fine even if it
> is not in trusted sites or intranet zone???? Therefore the issue seems to be
> with the app passing credentials to the web service but why adding to trusted
> or intranet zone should rectify the problem - I'm confused......
>
> Anyone got any ideas why? Is there a security setting I should be setting
> somewhere. Any info would be appreciated.

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: hellrazor | last post by:
Hi there, I'm very new to dot net programming and webservices programming. I've managed to create simple webservices so far. Here's my problem: -I've been given a project which needs to...
1
by: Nalaka | last post by:
Hi, I am testing with Visual studio 2005, web projects. Situation: I have one solution with two web projects, created as file system projects. (I am tesing using the built in server, not IIS)...
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
8
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do...
1
by: Mr Bojangles | last post by:
Hi, I want a do the following: From a (client side) web form, post to server side script (I'm using Javascript but anything will do), which in turn--and this is the important bit that I...
1
by: Thom Little | last post by:
I have a simple web service that requires no input and returns a character string. I created the service and FTPd it to a remote server. The .dll to the .bin directory and the single .asmx file...
2
by: Iain Adams | last post by:
I currently have a web service set that returns data. When I use these services through a browser, everything works fine and the resulting xml is displayed. However sometimes when I connect to the...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
1
by: smlchris | last post by:
I have encountered the following error message when I tried to login to website (though they have provided us the user id and password). You are not authorised to view this page. HTTP Error...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.