473,508 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"The page cannot be displayed" when running web service

VMI
I wrote a web service whose only purpose is to update a field in a table (sql
server). And everything works except for the browser window that opens up
with "The page cannot be displayed" error instead of displaying the text in
XML.
Here's more or less what I have:
[WebMethod(Description = "Stores data to DB and reports results.")]
public string checkAsciiFileCheck()
{
businessLogic bLogic = new businessLogic();
bLogic.processAsciiFile("test"); // If I comment this, I'll see the
"complete" in the new browser window in XML format. Otherwise, I get the IE
error.
return "complete";
}
If I eliminate the second line of code, I see the "complete". If I leave it,
I'll get the error. I call one SP during execution and none of the methods
returns anything (all void). Everything runs since the table is successfully
updated. The web service does nothing else.
What could the problem be? I don't have much experience with web services.

Thanks.
Apr 26 '06 #1
1 2600
VMI,
try this:
businessLogic bLogic = new businessLogic();
try{
bLogic.processAsciiFile("test");
return "complete";
}
catch(Exception ex)
{
return ex.Message+ex.StackTrace;
}
}
if you get into the habit of wrapping your code in exception handling
blocks, you'll spend less time posting to newsgroups!

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"VMI" wrote:
I wrote a web service whose only purpose is to update a field in a table (sql
server). And everything works except for the browser window that opens up
with "The page cannot be displayed" error instead of displaying the text in
XML.
Here's more or less what I have:
[WebMethod(Description = "Stores data to DB and reports results.")]
public string checkAsciiFileCheck()
{
businessLogic bLogic = new businessLogic();
bLogic.processAsciiFile("test"); // If I comment this, I'll see the
"complete" in the new browser window in XML format. Otherwise, I get the IE
error.
return "complete";
}
If I eliminate the second line of code, I see the "complete". If I leave it,
I'll get the error. I call one SP during execution and none of the methods
returns anything (all void). Everything runs since the table is successfully
updated. The web service does nothing else.
What could the problem be? I don't have much experience with web services.

Thanks.

Apr 26 '06 #2

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

Similar topics

7
4521
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm"...
14
1765
by: VMI | last post by:
Everytime I open my machine's MSDN and look for a subject, when I double-click on anything, I get "The page cannot be displayed" . What's wrong?
1
6857
by: JohnZing | last post by:
i tried to install asp.net forums all went ok, but after login i always get "Object moved to here." in firefox or "The page cannot be displayed" in IE when i hit refresh, the page loads fine. ...
1
2226
by: emon.haider | last post by:
Hi guys, I just made a web application using ASP.Net and C#. The application compiles and works fine from my workstation, but after I uploaded it to my webserver, I am getting an error of "the...
9
6140
by: Martin Eyles | last post by:
Hi, I have set up an asp.net website on another PC in order to test it. The site was fine on my PC, but on the new PC all the pages give the error "The Page Cannot Be Found". Some legacy pages...
2
2775
by: spam1 | last post by:
Hi all, I'm not new to ASP.NET but I'm trying to get a simple Hello World page going on IIS 6.0 on Windows 2003. I'm connecting from the local machine. It comes back with the standard "The...
5
2786
by: David Thielen | last post by:
Hi; We have our app up on a beta server. Sometimes people from outside the firewall get "The page cannot be displayed" when they try to access it. A couple of weird things about this: 1) If...
2
6124
by: jhaxo | last post by:
I have a web page that I installed to IIS 6.0 from a web deployment project successfully. I am trying to deploy the same application to laptops that are running IIS 5.0. I am getting an error...
4
3503
by: Peter | last post by:
I have the following code which works fine in IE6 and IE7 and FireFox, but when I run IE6 on Citrix I get "The page cannot be displayed" in the iframe. We don't have IE7 on Citrix so I can't try...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
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...
0
7504
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...
0
5643
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,...
1
5059
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...
0
4724
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...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
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 ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.