tags:

views:

518

answers:

1

Hello

Question: 1

I am a beginner to WCF , I have taken a web application and hosted on IIS(with some port(250) and added a new WCF file, added an operation contract and tried to call the WCF service from the client web app through javascript, i was not able to get the jsdebug file itself to check wheteher proxy is created or not.

But when i add an new AjaxEnabledWCF file and added an operation contract and tried to call the WCF service from the client web app through javascript, i was able to get the jsdebug file, i am able to get the proxy object.

In the client side i have the code like this.

.aspx

function TestWCF() { Service.DoWork(onsuccess,onError,true); } function onsuccess(result) { alert(result); } function onError(error) { alert("Error: " + error.message); } function onfailed(error) { var i = 'failed'; } function oncompleted() { var i = 'completed'; }

But while invoking an operation contract i am getting 404 error and not able to figure out what is the problem

Question2 : Is there any possibility that i can make an WCF file to AjaxEnabledWCF file type

can you please help me

+1  A: 

Here is a basic check list to debug your problem:

  • Check your IIS log to make sure that the request is coming in where it is supposed to.
  • Check rights in IIS that the request is being allowed through.
  • Check authentication / authorization in web.config.
  • If impersonate is false check rights of identity of application pool
  • Check security settings on disk where WCF service files are located.
  • Make sure that the dll referenced in the WCF service file is in the bin directory.
  • Check that ASP.net is set to 2.0 in IIS.
Shiraz Bhaiji