473,668 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Authorization not working as expected

las
I have created a web service and a simple ASP.Net page that makes calls
to the web service (the page roughly mimics the standard Visual Studio
web service test page).

Running on //localhost, if I disable Windows Authentication in IIS,
both my test page and the VS test page work just fine. But if I enable
Windows Authentication, my test page gives a (401) Unauthorized error
when it tries to call a web service function. Calls from the VS test
page work fine.

My web service web.config has:
<authenticati on mode="Windows" />
<authorizatio n>
<allow users="*" verbs="*" />
</authorization>

My test page web.config has:
<authenticati on mode="Windows" />
<!-- <identity impersonate="tr ue" /--I've tried this both ways
<authorizatio n>
<allow users="*" />
</authorization>

machine.config also sets windows authentication and allow users=*

More info:
For testing, I created a simple web service method that returns the
current user name (User.Identity. Name). The method returns the correct
user name, indicating that windows authentication is working (of
course, I only see this when using the VS test form to make the call).

I also display the current user name on my test form, and it is
correct.
I am flailing! Any ideas why I get the unauthorized error?

Thanks!
Lee

Aug 17 '06 #1
1 1328
las
Whoops! I missed the section in the documentation that says: "To pass
client credentials to an XML Web service using Windows authentication"

I didn't realize that my client had to *send* this info -- on an
intranet I assumed that it just happend.

Back to the books....

Lee

Aug 17 '06 #2

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

Similar topics

1
1584
by: J055 | last post by:
Ver. VS2005 Hi I'm using forms authentication and have set the authorization element to deny anonymous users. This works fine except that when I view the login.aspx page as an unauthenticated user I am denied access to non-asp files like css, gif, jpg etc. The only happens on the ASP.NET Development Server and not when I publish to
1
1743
by: Anthony Small | last post by:
Hello, I have a login.aspx page that is associated with a theme. When I view the page login.aspx with forms authentication/authorization set as below in the web.config file the theme displays on the page as expected. <authentication mode="Forms"> <forms loginUrl="~/Pages/Login.aspx" protection="All" timeout="40" /> </authentication> <authorization> <allow users="*"/>
0
2038
by: ronscottlangham | last post by:
I have a web page that any authenticated user can access, but I dynamically enable/disable other asp.net controls on the web page based on the Role that they are in via C# code behind. My web config is as follows... <system.web> <authorization> <deny users="?" /> </authorization>
3
1344
by: Jonathan Wood | last post by:
I have a subfolder on my Website that contains images. It also contains the web.config file shown below. When I access the site, I get the Login page as expected. But if I type in the URL of an image in the folder that contains images, the image is displayed in the browser. I don't understand why I am not prevented from seeing the contents of this folder since I have not been authenticated. Does it have something to do with the fact...
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8371
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8652
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.