473,382 Members | 1,367 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,382 software developers and data experts.

using web-service with C# Smart Client Windows application

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 ;
[code:1:22ead3aeaf]
[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]));
}
[/code:1:22ead3aeaf]
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 :
[code:1:22ead3aeaf]
DataSet ds = new System.Data.DataSet();
Users wsUsers = new Users();
ds = wsUsers.GetMovies(129);
[/code:1:22ead3aeaf]
this is where i get the above mentioned error..
can anyone pls help????
tks a lot...
[/code]
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 16 '05 #1
0 1506

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

Similar topics

0
by: canasdaq | last post by:
Can anyone please help me. I was looking at the article "http://www.eggheadcafe.com/articles/20030603.asp". I am new to .net and know nothing in c#. I want to write a menu in asp.net. Can anyone...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
0
by: zhaoJian | last post by:
Here it is my code ,but it can't update the database.How to do it ? In _UpdateUnit event, I can not get the original value to @Original_UnitID,so I set a hidden column named LabelKey.But It...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
3
by: msnews.microsoft.com | last post by:
Hello All, I am trying to write Web Controls and in most of the samples I came across, I am seeing the following function where a HTML string is written to create HTML Controls. ///...
2
by: Nu2ASP.NET | last post by:
What I am trying to do is essentially 'flip' the bits, when the user clicks in the checkbox. For example, if the CheckBox appears checked, and the user un-checks it, I want the underlying data...
8
by: acb | last post by:
Hi, I wrote a DLL Component (using Visual Studio 2005) and managed to include it into a C# Console application. I am now trying to include this component into a Web project. I copy the DLL...
3
by: asadikhan | last post by:
Hi, I am trying to use a datalist to edit data in a MySql database as follows. For now I just want to be able to get the changes to be made on the dataset. Here is my code: using System;...
0
by: Eugene Anthony | last post by:
The problem with my coding is that despite removing the records stored in the array list, the rptPages repeater control is still visible. The rptPages repeater control displayes the navigation...
6
by: tshad | last post by:
I was looking at a page that showed how to set up a custom event and it seems to work ok. But I am not sure how I would use it. How would I subscribe to it. There is actual action (such as...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.