I have a web-site under IIS7 on Win7. Created a new WCF Service Application in Visual Studio 2010 under .NET 4.0. It works fine under ASP.NET Development server, but when I deploy my app to IIS and trying to access it via URL "http://localhost/MySite/Service1.svc" I have this error:
System.Runtime.Remoting.RemotingException: Requested Service not found
If I'm just trying to open site folder "http://localhost/MySite/" I have this error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Runtime.Remoting.Channels.Http.HttpChannelHelper.GetObjectUriFromRequestUri(String uri)
at System.Runtime.Remoting.Channels.Http.HttpRemotingHandler.CanServiceRequest(HttpContext context)
at System.Runtime.Remoting.Channels.Http.HttpRemotingHandler.InternalProcessRequest(HttpContext context)
There is a default.aspx also in this folder and i can open it successfully by direct link "http://localhost/MySite/default.aspx" but it is not opened as default document.
No stack trace, no errors in Windows App or System log. I've tried to enable tracing in web.config - nothing.
The web.config is:
="1.0"
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
While researching this problem I've found that error occures even before IIS actually starts my service. I changed my .svc file to have "ServiceLost" instead of "ServiceHost" tag, but error remains the same.
I assume that error source is somewhere in .NET assemblies. But where?!