Starter Kit Template is Read-Only?

Last post 06-20-2009 4:44 AM by j3rich0. 6 replies.

Sort Posts:

  • Starter Kit Template is Read-Only?

    05-28-2009, 8:26 PM
    • Member
      point Member
    • j3rich0
    • Member since 11-05-2008, 12:30 PM
    • Posts 7

     Hello, I'm following a screencast on the WCF Starter Kit and this one involves building a bookmark service, anyway at point he opens up the definition for ICollectionService<Bookmark> and that opens up Service.base.svc.cs which he edits and so on. Well that doesn't happen with me, instead the definition for ICollectionService opens up System.ServiceModel.Web.SpecilizedServices.ICollectionService.cs which is read-only and I can't modify. So what am I doing wrong?

     

    thanks

  • Re: Starter Kit Template is Read-Only?

    05-29-2009, 1:54 PM
    • Member
      90 point Member
    • randallt
    • Member since 02-11-2009, 4:53 PM
    • Posts 30

    I haven't watched the sceencast, but I'm guessing that you've following the definition of the wrong class or member.  You shouldn't need to change the ICollectionService.cs.  You want to change the service that derives from the ICollectionService.  You can also just right click on the Service.svc file and choose "View Code".

     ~Randall 

  • Re: Starter Kit Template is Read-Only?

    05-29-2009, 3:40 PM
    • Member
      point Member
    • j3rich0
    • Member since 11-05-2008, 12:30 PM
    • Posts 7

    I am opening the correct class, the ICollectionService base class is where the UriTemplates are defined so I do need to change it if I want to change the URIs

     this is the screencast I am talking about, http://channel9.msdn.com/shows/Endpoint/endpointtv-Screencast-Building-resource-collection-services-with-the-WCF-REST-Starter-Kit/

     if you go to ~4:39 you can see he opens the definition for ICollectionService

  • Re: Starter Kit Template is Read-Only?

    06-12-2009, 12:11 AM

    Well, the screencast you were watching was using Starter Kit Preview 1 (anyway it is not the Preview 2 on the Codeplex now). In Preview 2, the service class inherits from the default ICollectionService<Item> in the sevicebase file which is compiled to the dll we install. So, you can not modify it. :)

  • Re: Starter Kit Template is Read-Only?

    06-16-2009, 3:20 PM
    • Member
      2 point Member
    • St4Rp
    • Member since 06-16-2009, 6:49 PM
    • Posts 1
    The code previously published with preview 1 is now compiled and built-in part of the Microsoft.ServiceModel.Web.dll assembly. Therefore correct, it seems to be read-only which prevents customization efforts shown in the screen casts related to the preview 1.

    The good news is however there is a way to customize, as the code still comes along with the installer package. All the files you need are in the zipped folder within your installation directory at "%programfiles%\WCF REST Starter Kit Preview 2\WCF REST Starter Kit Preview 2.zip\Microsoft.ServiceModel.Web\Microsoft.ServiceModel.Web\SpecializedServices". So you could copy the appropriate file into your current project folder in order to start customization. Let say you are going to customize SingletonService, then copy the SingletonServiceBase.cs into your project folder and alter the original "Microsoft.ServiceModel.Web.SpecializedServices" namespace to your own project's namespace. This makes sure the compiler will not confuse the classes (e.g. SingletonServiceBase<...>) living within the installed Microsoft.ServiceModel.Web.dll assembly. You perhaps also will need to delete the using directive in the Service.svc.cs file referring to the Microsoft.ServiceModel.Web.SpecializedServices namespace.

     

  • Re: Starter Kit Template is Read-Only?

    06-19-2009, 6:32 PM

    St4Rp's tip is exctly correct - in the Preview 2 release of the starter kit you need to pull in the base class into your project and modify it. In Preview 1 that code was readily available in the template itself. I'll bring this up with the team so we can find a better way to expose things like the UriTemplates for customization.

    Thanks,
    -Yavor

    If this answers your question, please mark as answered.

    Program Manager | Silverlight Web Services Team | Microsoft
  • Re: Starter Kit Template is Read-Only?

    06-20-2009, 4:44 AM
    • Member
      point Member
    • j3rich0
    • Member since 11-05-2008, 12:30 PM
    • Posts 7
    thanks for the answer
Page 1 of 1 (7 items)