468,291 Members | 1,566 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,291 developers. It's quick & easy.

"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 2390
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Martin Eyles | last post: by
4 posts views Thread by Peter | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.