473,566 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://kajol
.csse.monash.ed u.au/cse3211/ValidateUser",
RequestNamespac e="http://kajol.csse.mona sh.edu.au/cse3211",
ResponseNamespa ce="http://kajol.csse.mona sh.edu.au/cse3211",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)
]
public int ValidateUser(st ring userName, string password) {
object[] results = this.Invoke("Va lidateUser", 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.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://kajol
.csse.monash.ed u.au/cse3211/GetMovies",
RequestNamespac e="http://kajol.csse.mona sh.edu.au/cse3211",
ResponseNamespa ce="http://kajol.csse.mona sh.edu.au/cse3211",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)
]
public System.Data.Dat aSet GetMovies(int userID) {
object[] results = this.Invoke("Ge tMovies", new object[] {
userID});
return ((System.Data.D ataSet)(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.Dat aSet();
Users wsUsers = new Users();
ds = wsUsers.GetMovi es(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 1529

"Joseph R. Thomas" <NO************ ***********@yah oo.NOSPAM.com.s g> wrote in
message news:%2******** ********@TK2MSF TNGP12.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.Dat aSet();
Users wsUsers = new Users();
ds = wsUsers.GetMovi es(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
2159
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 Line: 0 - Metadata file 'RemoteLoader.dll' could not be found Line: 0 - Metadata file 'wwScripting.dll' could not be found' Service ran all...
14
5763
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 SQL DATABASE, probably by the click of a button. Is this possible? & what is the BEST APPROACH for doing this? & also if any links are there do...
3
5075
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 our web service (The "Web Service Server") running on a separate machine (also .NET 2.0, Win2003 Server, system 2). The web service server...
3
13773
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 service run in an application pool which runs under a domain user, this domain user has permissions of accessing database and the connection to...
0
2671
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; using System.Web; using System.Web.Services; using System.Web.Services.Protocols;
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.