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

Webservice with data retrieval

Hi all,

This is my first task with web services and quite new .NET.

I tried a test webservice with "hello world" and "addnum" functions.
When I tested them, they worked fine. Then in the same service I added
webmethods which interact with database and returns me the output.

When I execute these methods while testing, I'm getting "Page cannot
be displayed" in browser.

How to locate the problem? And what could be the problem?

Please help.

thanks
-srinivas
Nov 23 '05 #1
2 1141
Hi Srinivas,

Unfortunately I don't have an answer, but I'm in the same predicament and
posted a similar message (including my code) in the
microsoft.public.dotnet.framework.aspnet.webservic es news group. If I get a
response or some sort of revelation as to why this is happening I'll be sure
to post the solution here.

Cheers and Good Luck,

Daniel
"MLSrinivas" <ml********@gmail.com> wrote in message
news:d8**************************@posting.google.c om...
Hi all,

This is my first task with web services and quite new .NET.

I tried a test webservice with "hello world" and "addnum" functions.
When I tested them, they worked fine. Then in the same service I added
webmethods which interact with database and returns me the output.

When I execute these methods while testing, I'm getting "Page cannot
be displayed" in browser.

How to locate the problem? And what could be the problem?

Please help.

thanks
-srinivas

Nov 23 '05 #2
Hi again,

I was browsing through this newsgroup hoping for an answer when I noticed a
snippet of code in a semi-related thread that I thought might help shed some
light onto why I was unable to retrieve the information necessary and why
the page was incapable of being displayed.

I added the code below to my webMethod that is returning a string of XML
data and suddenly I was able to get to the heart of my issue.

So here goes.

string xmlPlayerList;
try
{
sdaManageRoster.SelectCommand.Connection.Open();
sdaManageRoster.SelectCommand.Prepare();
sdaManageRoster.SelectCommand.Parameters["@player_id"].Value =
player_id;
sdaManageRoster.SelectCommand.Parameters["@is_active"].Value =
is_active;

sdaManageRoster.Fill(dsPlayerList);
xmlPlayerList = dsPlayerList.GetXml();
}
catch(Exception ex)
{
xmlPlayerList = ex.ToString();
}

sdaManageRoster.SelectCommand.Connection.Close();

return xmlPlayerList;

What this did for me was return the exact text of the exception I was
experiencing (but not seeing). The gist of it is that the default user was
not able to execute a stored procedure in the master database and so I was
unable to open the Connection in the first place. Once I put in the
necessary login info and made sure it was saved, my list of players was
successfully returned and displayed on the page.

Of course now I'm faced with the problem of figuring out the best way to
supply the login and password without having it hardcoded into the page
itself, but that's a minor issue compared to tracking down this one.

Cheers and I hope this helps,

Daniel
"MLSrinivas" <ml********@gmail.com> wrote in message
news:d8**************************@posting.google.c om...
Hi all,

This is my first task with web services and quite new .NET.

I tried a test webservice with "hello world" and "addnum" functions.
When I tested them, they worked fine. Then in the same service I added
webmethods which interact with database and returns me the output.

When I execute these methods while testing, I'm getting "Page cannot
be displayed" in browser.

How to locate the problem? And what could be the problem?

Please help.

thanks
-srinivas

Nov 23 '05 #3

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

Similar topics

5
by: mtv | last post by:
Hi all, I have the following code: ================================ Webservice side: public class MyWS: WebService { private myLib.DataObject curDataObject;
7
by: Alessandro Benedetti | last post by:
Hi. I'm calling two methods of a .NET Webservice (A) from another Webservice (B). The A Webservice is made like this: public class WSA: System.Web.Services.WebService { private int X = 0;
4
by: TrinityPete | last post by:
Hi all, We have a web application that uses web services for data access and retrieval. The web app and web services reside under IIS on the same server(WIN2003). The virtual directories have...
5
by: | last post by:
Hi, How long do webservice objects live for? In particular, if i have static variables filled with data from a static constructor in a webservice, how long will that data persist? thxs
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
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.