Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sure, no problem: first off, read all about the new WCF 4 features in <a href="http://msdn.microsoft.com/en-us/library/ee354381.aspx" rel="noreferrer">A Developer's Introduction to Windows Communication Foundation 4</a>.</p> <p>What you're looking for is called <em>file-less service activation</em>. It's a new setting in your <code>&lt;system.serviceModel&gt;</code> that looks something like this:</p> <pre><code>&lt;serviceHostingEnvironment&gt; &lt;serviceActivations&gt; &lt;add factory="System.ServiceModel.Activation.ServiceHostFactory" relativeAddress="/YourService" service="SomeNamespace.YourService"/&gt; &lt;/serviceActivations&gt; &lt;/serviceHostingEnvironment&gt; </code></pre> <p>Basically, all the information you'd have in the *.svc file (path, service to call) is in this config section now.</p> <p>You should be able to call this service at</p> <pre><code>http://yourserver/virtualdirectory/YourService </code></pre> <p>now - no more *.svc, no messy URL rewriting etc. - it just plain works!</p> <p><strong>Update:</strong> it doesn't seem to work that well, unless you go in and add a *.svc extension to your relative path - kind defeats the whole purpose!</p> <p>If you want to register using an ASP.NET route, check out the <a href="http://msdn.microsoft.com/en-us/library/ee358760.aspx" rel="noreferrer">MSDN docs</a> on that topic. You'd have to have something like this in your application startup, in a web app that would be <code>global.asax.cs</code>:</p> <pre><code>void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); } private void RegisterRoutes(RouteCollection routes) { routes.Add(new ServiceRoute("YourService", new WebServiceHostFactory(), typeof(SomeNamespace.YourService))); } </code></pre> <p>Hopefully, with that, you'll be able to get your service up and running without any *.svc file extensions!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload