Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: 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 2:51am
Edited 24-Sep-12 23:34pm
Sergey Alexandrovich Kryukov at 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
0 OriginalGriff 328
1 Sergey Alexandrovich Kryukov 295
2 Gihan Liyanage 292
3 ClimerChinna 222
4 Abhinav S 187
0 Sergey Alexandrovich Kryukov 8,213
1 OriginalGriff 7,089
2 CPallini 2,598
3 Richard MacCutchan 1,925
4 Abhinav S 1,778

Advertise | Privacy | Mobile
Web01 | 2.8.140826.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2014
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