Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2006, 04:51 AM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks

can u also explain me, wht does this line do?

WS.Credentials = System.Net.CredentialCache.DefaultCredentials;


 
Old July 20th, 2006, 05:34 AM
Authorized User
 
Join Date: Nov 2005
Location: , , .
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Ganesh,

I have one more query:)

I am not facing any problem even if I disabled anonymous access through IIS(6.0)and set PreAuthenication=false.In web.config file also the authentication mode is "Windows".

Can you explain me the reason,why is it happening so?

 
Old July 20th, 2006, 05:44 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

passing the DefaultCredentials is passing the credentials of the person who has connected to the server. Here I am just saying that the person who connects using his credentials to the server is connecting to the webservice also...so if he has rights in the webservice, he will be authenticated..otherwise not

Regards
Ganesh
http://ganeshprof.blogspot.com
 
Old December 7th, 2007, 04:26 PM
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Ganesh,

My case/issue is similar, but there is a little bit difference:

On the web server where my web service resides:
(1) OS is Windows 2003 Server.
(2) IIS is 6.0 and its Directory Security is checked on Anonymous Access.
(3) .Net framework is 2.0.
(4) There is a web service developed by Visual Studio 2.0 -- just one web method "Hello World".

On the client server where a testing asp.net page which consumes the web service resides:
(1) OS is Windows XP professional.
(2) IIS is 6.0 and its Directory Security is checked on Anonymous Access too.
(3) .Net framework is 2.0.
(4) There is a testing asp.net page developed by Visual Studio 2.0 --just one button to invoke the web method "Hello World".

The two machine in the same network now.
Whenever I request the testing page, I will always get the error:
Additional information: The request failed with HTTP status 401: Unauthorized.

I followed your way, but it still doesn't work. When requesting the testing page, I don't need to do any authentication because the IIS on the client server has been set as Anonymous Access. The CredentialCache.DefaultCredential doesn't seem to hold any username and password. Any thought?

It's said that .net 2.0 doesn't allow Anonymous Access for web services anymore no matter what you set on the IIS of the server where the web service resides, correct? May I add an username/password which can pass the authentication of the web service server to the proxy instance? If so, how do you do it? Thanks in advance.








Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Status 404 rivcam JSP Basics 7 June 3rd, 2008 09:32 PM
IIS Basic authentication problem -401 Unauthorized bruceaflash BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 June 14th, 2005 08:28 AM
The request failed with HTTP status 401: Unauthori CBS .NET Web Services 3 November 30th, 2004 10:07 AM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM
HTTP status 404 brianjs JSP Basics 2 October 26th, 2003 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.