Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8685633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:37:43+00:00 2026-06-12T22:37:43+00:00

I followed this example to make my first WCF service: WCF REST Service JSON

  • 0

I followed this example to make my first WCF service: WCF REST Service JSON, then edited it to create my own. I was able to get my service to run fine in debugging using ASP.NET Developer Server. I opened port 8081(on the Server, Firewall and Router) and then assigned it to the “Registration” folder in IIS. I then published the service to a Windows Server 2003 running IIS 6 after spending a day figuring out I had to use MsDeployAgentService. I then set the ASP.NET version to 4.0.3019 using the IIS. The Registration folder contains Service1.svc, Web.config, and the bin folder.

This is my web config file:

<?xml version="1.0"?>
<configuration>
  <configSections>
    </configSections>
  <connectionStrings>
    <add name="ServiceApp.Properties.Settings.RegistrationConnection"
      connectionString="Data Source=EDITED;Initial Catalog=Registration;Persist Security Info=True;User ID=EDITED;Password=EDITED;MultipleActiveResultSets=True" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime maxRequestLength="524288" />
  </system.web>
  <system.serviceModel>
    <bindings>
      <webHttpBinding>
        <binding name="StreamedRequestWebBinding"
                 bypassProxyOnLocal="true"
                 useDefaultWebProxy="false"
                 hostNameComparisonMode="WeakWildcard"
                 sendTimeout="10:15:00"
                 openTimeout="10:15:00"
                 receiveTimeout="10:15:00"
                 maxReceivedMessageSize="2147483647"
                 maxBufferSize="2147483647"
                 maxBufferPoolSize="2147483647"
                 transferMode="StreamedRequest">
          <readerQuotas maxArrayLength="2147483647"
                        maxStringContentLength="2147483647" />
        </binding>
      </webHttpBinding>
    </bindings>
    <services>
      <service name="ServiceApp.Service1" behaviorConfiguration="ServiceBehaviour">
        <endpoint address=""  binding="webHttpBinding" bindingConfiguration="StreamedRequestWebBinding" contract="ServiceApp.IService1" behaviorConfiguration="web">
        </endpoint>
          </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehaviour">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

When I try to consume the service with a test client I get Error 404 with the following statement

byte[] data = client.DownloadData("http://ServerIP:8081/Registration/Service1.svc/CheckSoftware/1/Customer1/1_0/abc123/1/1");

When I remove the port I get an Error 401 “Not Authorized”

byte[] data = client.DownloadData("http://ServerIP/Registration/Service1.svc/CheckSoftware/1/Customer1/1_0/abc123/1/1");

I have tried using the LAN IP aswell as the WAN IP address.

Followed this post because it looks liked the OP followed the same example and had simalar problems but It didn’t help.

I then looked in the Event Viewer on the server and found this when I included in the port number:

WebHost failed to process a request.
 Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/23878916
 Exception: System.Web.HttpException (0x80004005): The service '/Registration/Service1.svc' does not exist. ---> System.ServiceModel.EndpointNotFoundException: The service '/Registration/Service1.svc' does not exist.
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
 Process Name: w3wp


 Process ID: 3460

I can clearly see the Service1.svc file exist in the folder. I am pretty lost at this point and would appreciate any help.

EDITED TO INCLUDE MORE CODE:

    namespace ServiceApp
{
    [ServiceContract]
    public interface IService1
    {

        [OperationContract]
        [WebInvoke(Method = "GET", 
          UriTemplate = "/CheckSoftware/{SoftwareId}/{CustomerId}/{Version}/{Key}/{MoboID}/{ProcessorID}",
          RequestFormat = WebMessageFormat.Json, 
          ResponseFormat = WebMessageFormat.Json)]
        SoftwareStatus CheckSoftware(string SoftwareID, string Version, string CustomerID, string Key, string moboID, string processorID);

        [OperationContract]
        [WebInvoke(
          Method = "GET", 
          UriTemplate = "/SaveKey/{SoftwareId}/{CustomerId}/{Key}/{MoboID}/{ProcessorID}",
          RequestFormat = WebMessageFormat.Json, 
          ResponseFormat = WebMessageFormat.Json)]
        string SaveKey(string SoftwareID, string CustomerID, string Key, string moboID, string processorID);
    }

    [DataContract]
    public class FileInformation
    {
        [DataMember]
        public string Name
        {
            get;
            set;
        }

        [DataMember]
        public byte[] Content
        {
            get;
            set;
        }
    }

    [DataContract]
    public class Employee
    {
        [DataMember]
        public int Id
        {
            get;
            set;
        }

        [DataMember]
        public string Name
        {
            get;
            set;
        }
    }
    [DataContract]
    public class SoftwareKey
    {
        [DataMember]
        public string SoftwareId
        {
            get;
            set;
        }
        [DataMember]
        public string CustomerId
        {
            get;
            set;
        }
        [DataMember]
        public string Version
        {
            get;
            set;
        }
        [DataMember]
        public string Key
        {
            get;
            set;
        }
    }

    [DataContract]
    public class SoftwareStatus
    {
        [DataMember]
        public Boolean SoftwareId
        {
            get;
            set;
        }
        [DataMember]
        public Boolean CustomerId
        {
            get;
            set;
        }
        [DataMember]
        public Boolean Version
        {
            get;
            set;
        }
        [DataMember]
        public Boolean Key
        {
            get;
            set;
        }
        [DataMember]
        public Boolean HardwareID
        {
            get;
            set;
        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:37:45+00:00Added an answer on June 12, 2026 at 10:37 pm

    When using IIS 6.0 for a Service I didn’t need to include the folder name in the URL. So simply changing one line of code solved my problems.

    byte[] data = client.DownloadData("http://ServerIP:8081/Service1.svc/CheckSoftware/1/Customer1/1_0/abc123/1/1");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed this tutorial to set up my REST webservice for JSON and XML.
I followed this tutorial to get started using Android host api with an Arduino
I have been trying to register 3 hotkeys. I followed this example (or this
I followed a great example of how to make a sub-menu appear/disappear on click
I've followed this example: RCP+JavaWS but the app just briefly comes up and goes
I followed this example of google to save markers on a database. So, the
Followed this question about delayed_job and monit Its working on my development machine. But
I followed this tutorial . But whenever I try to log in with my
I followed this video tutorial for detecting memory leaks using Instruments with Xcode 4.3.2.
I followed this link to gzip my php driven website It's working fine but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.