473,383 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Using Web Service with C#


hi,
i am utilizing a web service in a C# windows application for a smart
client.
there is a method

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://kajol
.csse.monash.edu.au/cse3211/ValidateUser",
RequestNamespace="http://kajol.csse.monash.edu.au/cse3211",
ResponseNamespace="http://kajol.csse.monash.edu.au/cse3211",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)
]
public int ValidateUser(string userName, string password) {
object[] results = this.Invoke("ValidateUser", new object[]
{
userName,
password});
return ((int)(results[0]));
}

which works fine.....when i supply a user name and pwd..

but then there is this other method ;

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://kajol
.csse.monash.edu.au/cse3211/GetMovies",
RequestNamespace="http://kajol.csse.monash.edu.au/cse3211",
ResponseNamespace="http://kajol.csse.monash.edu.au/cse3211",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)
]
public System.Data.DataSet GetMovies(int userID) {
object[] results = this.Invoke("GetMovies", new object[] {
userID});
return ((System.Data.DataSet)(results[0]));
}

but whenever i supply the user id (196 or 129) to this it gives me error
saying
"The remote server returned an error : (403)
Forbidden"

but when i manually go to the site and enter the user id (196 or 129) i
dont get any error and i can see the data in XML format..
what i am trying to do in my code is to get the dataset returned by the
web-service method : "GetMovies" into a dataset so i do this :
DataSet ds = new System.Data.DataSet();
Users wsUsers = new Users();
ds = wsUsers.GetMovies(129);

this is where i get the above mentioned error..
can anyone pls help????
tks a lot...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
1 1524

"Joseph R. Thomas" <NO***********************@yahoo.NOSPAM.com.sg> wrote in
message news:%2****************@TK2MSFTNGP12.phx.gbl...

hi,
i am utilizing a web service in a C# windows application for a smart
client.
there is a method [snip] but whenever i supply the user id (196 or 129) to this it gives me error
saying
"The remote server returned an error : (403)
Forbidden"

but when i manually go to the site and enter the user id (196 or 129) i
dont get any error and i can see the data in XML format..
what i am trying to do in my code is to get the dataset returned by the
web-service method : "GetMovies" into a dataset so i do this :
DataSet ds = new System.Data.DataSet();
Users wsUsers = new Users();
ds = wsUsers.GetMovies(129);

this is where i get the above mentioned error..
can anyone pls help????
tks a lot...


Is the server running Windows XP? Error code 403 might be an indication that
you are running into the 10 concurrent connections limit on Windows XP. If
so, try disabling HTTP keep-alives from IIS settings. This will not remove
the connection limit but will allow a few more connections.

Sami
Nov 16 '05 #2

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

Similar topics

6
by: Nathan Kovac | last post by:
Yesterday afternoon I was getting the following errors in a windows service: 'DatabaseManager.DataComponent', 'Error', '3 Errors: Line: 0 - Metadata file 'ScriptingMethods.dll' could not be found...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
3
by: Michael Hoehne | last post by:
Hi, I'm currently facing a problem with a mixed environment using .NET 1.1 and ..NET 2.0 web services. We have a client application (the "client", system 1) running on .NET 2.0/WinXP, calling...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.