Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

response.write

Status
Not open for further replies.

ace333

Programmer
Jul 12, 2005
105
CH
Why wont response.write work in a

asmx.cs file.

if i try to pass the error as a string to a method is has to be a web method which takes a string as a parameter. Fine so far. The web method returns the string to web form so i can view the error.
However when i call the webmethod from the form it expects a string paramater,, what do i do

i know my web service is not working , so i want to write the errors in my catch block some where to see whats happening
 
Why don't you just write them out to a label or literal control?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Or to a database or on email etc...there are lots of options available.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
ya but that is on the web form side, the catch block is in the asmx.cs side
 
You can still log your errors to a db or email from an asmx file (or even just step through them in debug mode).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
email or db is too much hassle , i'll debug instead, thanks
 
when ur debugging though if the aspx file fails does the debugger go through the asmx.cs code then or what
 
I'm presuming you have written the web service, and if you have, you can simply debug the web service when a request is made.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Having problems finding where the problem is, the code i have executes a stored procedure that writes to a database. it works within the confines of a normal web form project but its not working as a web service...

i have try and catch blocks but i cant see the output from the catch blocks as response.write wont work and i cant think of what else to do...
 
have the function that you're calling in the web service return a string as a status....


Code:
try

 'code goes here...
 return 'Success'
catch ex as exception
 return ex.message & " " & ex.stacktrace
end try


"...we both know I'm training to become a cagefighter...see what happens if you try 'n hit me..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top