Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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 June 4th, 2010, 12:14 AM
Authorized User
Join Date: Dec 2005
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surendraparashar
Default Web Service - Add Web Reference - Object moved to

Dear All,

I have created a web service in a web application, in this web application form authentication is implemented. When we try to add web reference of this web service in this web application by putting URL of web service in visual studio's add webreference interface, then it redirects to login page for authentication, by putting valid username & password for authentication then redirect to web service url and below following screen shows


The following operations are supported. For a formal definition, please review the Service Description. -------------------------------------------------------------------------------------------------------------------------------

and in right hand side of window following error occurs

Web Services found at this URL

There was an error downloading 'http://localhost:1761/poc.netNew/POCWebServices/ImageVerificationService.asmx'.
The request failed with the error message:
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/poc.netNew/Login/Login.aspx?ReturnUrl=%2fpoc.netNew%2fPOCWebService s%2fImageVerificationService.asmx">here</a>.</h2>

Please help me, how to remove this error.
when we remove form authentication this error is not comming but we must need form authenti cation.
Surendra Parashar
Old June 11th, 2010, 11:15 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

You can't use forms authentication for a web service. If you need to secure your web services you must go about it another way. You can secure your application but expose any web services served by it without the security mechanism blocking it. Add a <location> node to the web config with the relative path of the web service and allow all users. This will leave security on the application as a whole using forms authentication but allow unauthenticated access to the service.

If you want to secure the service, you could use SOAP headers with some security information in them, or web service parameters that include some authentication data. For example, I've used encrypted strings included in SOAP headers for authenticating clients of restricted services.
The Following User Says Thank You to planoie For This Useful Post:
surendraparashar (June 11th, 2010)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot add web service to UDDI cc .NET Web Services 0 November 2nd, 2007 06:06 AM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
Adding a reference to a web service loganscott2000 .NET Web Services 1 April 13th, 2005 09:51 PM
COM object in web service Kristinn ASP.NET 1.x and 2.0 Application Design 3 March 13th, 2005 04:03 PM
Web Service Reference Issue eshyong .NET Web Services 1 November 2nd, 2003 12:11 AM

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