A
Avery D
Guest
I'm using ASP.Net 3.5 to provide data through an Ajax service call but I'm probably going about it all wrong.
I created a web project which uses response.write to print text to a page based on value pairs in the query string. Pages on a different domain use JavaScript and Ajax to request, reformat, and display that text. I'm attempting to build a service url to supply data for other pages using Ajax. I doubt that my approach in using a web page is the way to do this in c# dot net. Mainly, I get this error when I make the Ajax request: uncaught exception:
Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
I don't get the error when the requesting page and the requested page are on the same domain.
Many of the examples I've found show how to do this kind of thing with .net web page controls but my service page has no knowledge of the client. It's basically a standalone page that serves up some text. I'm lost as to how to proceed in the correct way. I'm sure I should not be using response.write. I have a vague notion that json is needed (not sure exactly how it fits in), and something about making a web service? I'm not sure how any of this differs from making a basic web page for the service.
I've spent hours Googling with little success. I just don't know what to look for. Any help is appreciated.
I created a web project which uses response.write to print text to a page based on value pairs in the query string. Pages on a different domain use JavaScript and Ajax to request, reformat, and display that text. I'm attempting to build a service url to supply data for other pages using Ajax. I doubt that my approach in using a web page is the way to do this in c# dot net. Mainly, I get this error when I make the Ajax request: uncaught exception:
Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
I don't get the error when the requesting page and the requested page are on the same domain.
Many of the examples I've found show how to do this kind of thing with .net web page controls but my service page has no knowledge of the client. It's basically a standalone page that serves up some text. I'm lost as to how to proceed in the correct way. I'm sure I should not be using response.write. I have a vague notion that json is needed (not sure exactly how it fits in), and something about making a web service? I'm not sure how any of this differs from making a basic web page for the service.
I've spent hours Googling with little success. I just don't know what to look for. Any help is appreciated.