Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Consume Web Service Error: Access Denied


Message #1 by Philip Steel <PhilipS@t...> on Wed, 25 Sep 2002 13:40:22 +0100
Hi all

I have created a web service that contains a WebMethod to Query a table in a
database and return a DataSet
of the results.

The web service works fine and the proxy class I created from WSDL compiled
into my DLL ok too,
 but when I try to consume the web service from an ASP page it returns the
following error:

System.Net.WebException: The request failed with HTTP status 401: Access
Denied

Here's the code in the ASP.NET Page - 

<%
MyNamespace.ClientQuestionnaire obj = new MyNamespace.ClientQuestionnaire();
ClientRepeater.DataSource = obj.ClientList();
ClientRepeater.DataBind();
%>
	<asp:Repeater ID="ClientRepeater" Runat="server">
		<ItemTemplate>
		<tr>
			<td class="xmllinks"><%#
DataBinder.Eval(Container.DataItem, "CompanyName")%></td>
  		</tr>
  		</ItemTemplate>
  	</asp:Repeater>

Any ideas why access is denied?

Phil

Phil Steel
TEQUILA\ Digital
82 Charing Cross Road 
LONDON WC2H 0QB 
020 7557 6228 



  Return to Index