locked
File-less Activation RRS feed

  • Question

  • I read article on page http://msdn.microsoft.com/en-us/library/ee354381.aspx#_Discovery about file-less activation.

    In WCF in .NET 4, they’ve introduced yet another configuration feature that makes it possible to define virtual service activation endpoints that map to your WCF service types. This makes it possible to activate services even without an .svc file, what we’re referring to as “file-less activation.”
    The following example shows how to configure an activation endpoint within your web.config file:

    <configuration>
      <system.serviceModel>
        <serviceHostingEnvironment>
          <serviceActivations>
            <add relativeAddress="/GreetingService" service="GreetingService"/>
          </serviceActivations>
        </serviceHostingEnvironment>
      </system.serviceModel>
    </configuration>

    With this in place, it’s now possible to activate the GreetingService using a relative path of "/Greeting" (relative to the base address of the Web application). In order to illustrate this, I’ve created an IIS application on my machine called “GreetingSite”, which I assigned to the “ASP.NET v4.0” application pool, and mapped it to the GreetingService project directory that contains the web.config shown above.
    Now I can simply browse to http://localhost/GreetingSite/Greeting to activate the GreetingService without using an .svc file. Figure 10 shows what this looks like in the browser.

    So I created service HelloWorldService and set relativeAddress to /HelloWorld but when I simple browse to htp://localhost/HelloWorldWebSite/HelloWorld I saw folowing error:
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: The value for the property 'relativeAddress' is not valid. The error is: '/HelloWorld' is an absolute address. The supported relativeAddress formats are "[subfolder/]filename" or "~/[subfolder/]filename". 

    Source Error:


    Line 13:     <serviceHostingEnvironment>
    Line 14:       <serviceActivations>
    Line 15:         <add relativeAddress="/HelloWorld" service="HelloWorldService"/>
    Line 16:       </serviceActivations>
    Line 17:     </serviceHostingEnvironment>
     
    Is something new in Beta 2 file-less activation?

    Tuesday, November 17, 2009 4:59 PM

Answers

  • This particular scenario in svc-less activation was supported in WCF Beta 1, but it is no longer supported in Beta 2, since there did not seem to be any particular customer ask about this. We are working on bringing this support back to the framework, but this will happen in post-NET 4.
    Tuesday, November 17, 2009 5:30 PM
    Moderator

All replies

  • This particular scenario in svc-less activation was supported in WCF Beta 1, but it is no longer supported in Beta 2, since there did not seem to be any particular customer ask about this. We are working on bringing this support back to the framework, but this will happen in post-NET 4.
    Tuesday, November 17, 2009 5:30 PM
    Moderator
  • Interesting, I'm a particular customer who is interested in this very thing .

    Also there are others .

    In my case I resorted to using VirtualPathProvider but have always felt that it was a bit of a hack.
    Tuesday, January 12, 2010 4:30 AM
  • Bad news. I hope you will add sooner than next framework generation ='((((
    Wednesday, March 31, 2010 1:07 PM