Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...jquery to WCF via AJAXjquery to WCF via AJAX
Previous
 
Next
New Post
2/17/2009 9:18 PM
 

Anyone able to get this working?  I can get jQuery ajax via the $.ajax{} or $.getJSON{} client methods to successfully communicate with handler files (ashx) but have - to this point - been totally unsuccessful to get this to work with wcf as it always says it cannot find the resource.. ?  Anyone able to get this or even communication via ajax to a web service working with jQuery or regular old raw javascript?  

 

any help on this is much appreciated!
 

regards,

 

Kevin

 
New Post
2/18/2009 9:22 AM
 

Check to make sure IIS is properly configured to serve up your WCF services (see MSDN).  Next check out Rick Strahl's blog, specifically this link, this one, and this one.  He had some great presentations at DevConnections last year in Vegas.  That was the turning point for me when I decided to start using jQuery and been very pleased since then.

Good luck!


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
New Post
2/18/2009 12:52 PM
 

 Hey Jon -

 

Thanks for jumping in to try and help here - appreciate it! Yep Im definitely familiar with Rick's work and his blog - been up and down those posts and I have been using WCF (somewhat) in traditional .net webform dev.  My problem is really related to DNN and jQuery - as an example - I have this code currently in a button a tag click event:

k$("a").click(function() {
//Proxy.invoke("add", { 'A': 2, 'B': 3 }, fnSuccess, fnFAILURE);
k$.ajax({
url: '/DesktopModules/KSTech.SandboxModule/services/serviceTest.svc/testmethod',
data: {},
type: "POST",
processData: false,
contentType: "application/json",
timeout: 10000,
dataType: "text",
success: function(res) {
res);
},
error: function(xhr) {
xhr.statusText);
}
});
 
});
 
 
This .ajax method call works when using web handlers (.ashx) but fails when trying to use a wcf service (.svc).  Any thoughts?
 
 
thanks!
 
Kevin

 
New Post
2/18/2009 3:55 PM
 

Any chance you have the UrlScan enabled on your server?  I came across this post by Scott Hanselman last week or so which just popped in my mind right now as a possible issue with your WCF service. 

On that same note, there was something Rick Strahl mentioned at the conference about "seemingly" empty data posts and how he had to hack it and force at least 2 bytes of data to be posted even when they weren't necessary.  I wish I could remember *exactly* what he said about it but I can see that your data is definitely empty ( data: { } ).  I have to run right now otherwise I'd look for what he said about "empty" posts with WCF and the workaround but suffice it to say that definitely is an issue that he brought up and possibly the issue you are running into.


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...jquery to WCF via AJAXjquery to WCF via AJAX


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out