Please Help New at this

S

Sanjay

I have written a web service to return information from the database. This
works and the data is returned in XML format from the database and displayed
on the web page as well when this web service called getsampledata is
invoked. Now I create a web page and created a webservice using the web
reference technique in the VS .NET to consume this web service. The web
page (application), web server, web service and database are on the same
box. Here is where my problems start. I keep getting this error message
reproduced here.

System.Net.WebException: The request failed with HTTP status 401: Access
Denied. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
WebPageWebServiceTest.HPSD.Service1.GetSampleData() in
C:\Inetpub\wwwroot\WebPageWebServiceTest\Web
References\HPSD\Reference.cs:line 40 at
WebPageWebServiceTest.WebForm1.Button1_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\webpagewebservicetest\webform1.aspx.cs:line 69

Name of the web page trying to consume the webservice =
WebPageWebServiceTest
Name of the webservice HPSD.Service1.GetSampleData().


I have played around with the web config file and have the following working
web.conifg parameters
<authentication mode="None" />

<identity impersonate="true" />

Same parameters on both the web.config files ie on the web service and web
page(application). The database has aspnet configured as a user. The
following line is the connection string details on the webservice

sqlConnectionString="Provider=SQLOLEDB.1;integratedsecurity=SSPI;Persist
Security Info=False;Initial Catalog=XXX_DEV;Data Source=XXXX;

I just am not able to get past the error noted above.

I am wondering if anyone else has run into this problem. Any pointers/tips
much appreciated.

Thanks

Sanjay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top