By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,923 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

"The page cannot be displayed" when running web service

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.