473,385 Members | 1,919 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,385 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 3564
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.