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

  • Home
  • SEARCH
  • 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 988009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:34:32+00:00 2026-05-16T05:34:32+00:00

I would like to host a Wcf Service, create in a Wcf service Library,

  • 0

I would like to host a Wcf Service, create in a Wcf service Library, in a Web Application.

I’ve already done the same thing with Web Service asmx :

using System.Reflection;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace WebServiceLibrary
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class WebService1 : WebService, IHttpHandlerFactory
    {
        private static WebServiceHandlerFactory wshf = new WebServiceHandlerFactory();
        private static MethodInfo coreGetHandlerMethod = typeof(WebServiceHandlerFactory).GetMethod("CoreGetHandler", BindingFlags.Instance | BindingFlags.NonPublic);

        public System.Web.IHttpHandler GetHandler(System.Web.HttpContext context, string requestType, string url, string pathTranslated)
        {
            return (IHttpHandler)coreGetHandlerMethod.Invoke(wshf, new object[] { GetType(), context, context.Request, context.Response });
        }

        public void ReleaseHandler(IHttpHandler handler)
        {

        }

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
    }
}

The web.config file of the Web Application :

    <system.webServer>
      <handlers>
          <add name="WebService" path="WebService1.asmx" verb="*" preCondition="integratedMode" type="WebServiceLibrary.WebService1"/>
      </handlers>
    </system.webServer>

Is here a way to do the same thing with a Wcf Service ?

Regards.

  • 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-05-16T05:34:33+00:00Added an answer on May 16, 2026 at 5:34 am

    I found this solution : http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/350f2cb6-febd-4978-ae65-f79735d412db

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service that I would like to host in IIS 7.5.
I would like to host an application window from a process A into the
I have an IIS-Hosted WCF service and would like to make it available at
I would like to host a Maven repository for a framework we're working on
I would like to host a silverlight control in winforms via a winforms browser,
I would like to determine the operating system of the host that my Java
I would like to setup a admin page (ASP.NET/C#) that can add IIS host
I have 2 hosts and I would like to point a subdomain on host
On top of a dual quad core physical host, I would like to run
Would like to get a list of advantages and disadvantages of using Stored Procedures.

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.