IIS 7.0 error 404 Directory Not found WCF Deployment
Following is my code at client and server. Same code working good when deployed on IIS 8.5 in Windows Server 2012. Unable to finding even my IIS directory and resulting 404 error on IIs 7.0 in Server 2008. My request Url:http://Xx.xx.xx.xx/IISDir/MyRouteService/Home/Attachment
I tried even by simply placing Index.html in IIS(removed all my Service files)
http://Xx.xx.xx.xx/IISDir/Index.html
But no luck same 404 error. Correct me where I'm doing wrong on IIS 7.0
1)Calling WCF Rest service deployed in Test on IIS 7.0.
2)Calling from Desktop application using
HttpWebRequest(Namespace System.Net.Http)
3)Passing Windows credentials using
Hide Copy Code
NetworkCredential credential = new NetworkCredential("Domain/UserName", "pwd");
4) Request should hit service through ServiceRoute in Global.asax at server side
Hide Copy Code
protected void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.Add(new ServiceRoute("MyRouteService", new WebServiceHostFactory(), typeof(Service1)));
}
5) Service code
Hide Copy Code
[ServiceContract]
public interface IService1
{
[OperationContract]
[WebInvoke(
BodyStyle = WebMessageBodyStyle.Bare,
Method = "POST",
UriTemplate = "Home/Attachment")]
Stream HelloRequest(Stream stream);
}
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class Service1 : IService1
{
public Stream HelloRequest(Stream stream)
{
}
}