Hi Guys,
I have a WCF rest which is working fine in my development machine (Visual Studio web server). But I can not make it work in my QA server which is windows XP with IIS 5.1 (SSL enabled). ("Bad Request" or "not found")
If I go to the IIS and set the mapping ".*" to "aspnet_isapi.dll", then everything will be fine. but for some reason I don't want to do that (for example I will lose the default document behaviour!).
Is there any good way to solve this problem?
Here is my server code:
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode= AspNetCompatibilityRequirementsMode.Allowed)]
public class AjaxJSON : WCFBase
[WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate= "/Obj/Get/Status/{ObjID}")]
public AjaxJSONResponse_ObjIDStatus getImage(string ObjID)
{
}
}
and I have this code in my Global.asax
RouteTable.Routes.Add(new ServiceRoute("Rest",
new WebServiceHostFactory(),
typeof(Test.AjaxJSON)));
here is my config file ( application works in my development machine without this configuration using default configuration)
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="AjaxJSONSBinding">
<security mode="Transport">
<transport clientCredentialType="Windows" proxyCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="AjaxJSONServiceBehavior">
<serviceMetadata httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="AjaxJSONServiceBehavior" name="Test.AjaxJSON">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="AjaxJSONSBinding" contract="Test.AjaxJSON"/>
</service>
</services>
</system.serviceModel>
I have also tried calling the .svc from the Javascript (JQuery). but no chance!
all responses are welcome.
Thank you.