Click here to Skip to main content
11,927,006 members (49,922 online)
Rate this:
Please Sign up or sign in to vote.
See more: .NET IIS WCF .NET4
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:

<?xml version="1.0"?>
    <compilation debug="true" targetFramework="4.0" />
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <modules runAllManagedModulesForAllRequests="true"/>

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?!
Posted 24-Sep-12 3:51am
Edited 25-Sep-12 0:34am
Sergey Alexandrovich Kryukov 24-Sep-12 16:50pm
Check up the service's URI. Can you ping it?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100