locked
no service results RRS feed

  • Question

  • I'm having troubles getting the basic functionality of a WebDataService to work..  I can see the data through the "Dynamic Data Site" interface and I can see the ObjectQuery Results in the debugger, so I know the data connection works and the other pieces are basically working.  But I get nothing.   With what appears to be a correctly configured WebDataService, what I get when I query the root is:

    <service xml:base="http://localhost:9900/TestDS.svc/">

        <workspace>
    <atom:title>Default</atom:title>
    </workspace>
    </service>

    http://localhost:9900/TestDS.svc/$metadata returns no results (nothing on the page - no html - nothing)

    querying a specific record (e.g., http://localhost:9900/TestDS.svc/Companies[CompanyID=1]) returns:
    Resource not found.
    at Microsoft.Data.Web.WebUtil.CheckResourceExists(Boolean resourceExists)
    at Microsoft.Data.Web.RequestUriProcessor.ProcessRequestUri(String requestUri, IWebDataService service)
    at Microsoft.Data.Web.WebDataService`1.ProcessIncomingRequest()


    The service I'm attempting to connect through is rote:

    Code Snippet

    using Microsoft.Data.Web;
    using EditorialWSModel;

    namespace EditorWebServiceApplication
    {
        public class TestDS : WebDataService<EditorialEntitiesWS>
        {
            public static void InitializeService(IWebDataServiceConfiguration config)
            {
                 config.SetResourceContainerAccessRule("*", ResourceContainerRights.AllRead)
            }
        }
    }


    As I step through the code and look at the config object tree config.Provider.CurrentDataSource, I can see the ObjectQueries with the correct names.  After I change the ReourceContainerAccessRule, I can see the private fields (e.g., _Companies) fill with queries and show the appropriate record rows in Results View().  I've tried adding the config.SetServiceOperationAccessRule but it doesn't improve anything.

    When I make a request for a single table/entity (e.g., Companies) I can see that one private ObjectQuery (_Companies) get updated (turn red) in the debugger, then I get the "not found" error above (which is incorrect because it was found).

    What am I doing wrong?

    Setup: Beta1, Entity Data Model data source. "Dynamic Data Entities Web Application" as the project type.  "ADO.NET Data Service" as the starting filetype.  Tried EDMs both inside and outside the project, with and without partial extensions.  I also tried creating other copies of the svc file under different names, but am getting the same results.
    Tuesday, May 20, 2008 9:29 PM

Answers

  •  

    The stack trace points to old Pre Beta bits ,

     

    Resource not found.
       at Microsoft.Data.Web.WebUtil.CheckResourceExists(Boolean resourceExists)
       at Microsoft.Data.Web.RequestUriProcessor.ProcessRequestUri(String requestUri, IWebDataService service)
       at Microsoft.Data.Web.WebDataService`1.ProcessIncomingRequest()

     

    Can you please uninstall any old CTP bits of astoria and see if that helps.

    Wednesday, May 21, 2008 1:18 AM
    Moderator

All replies

  • Hi ,

     Can you please upgrade to the latest release ? we have made a lot of bug fixes and your scenario will most likely work there http://blogs.msdn.com/astoriateam/archive/2008/05/12/ado-net-data-services-framework-beta-1-is-live.aspx

     

     

    Tuesday, May 20, 2008 11:09 PM
    Moderator
  • I believe this is the latest release.
    Per the About Microsoft Visual Studio:

     VS 2008 9.0.30428.1 SP1Beta1

    .NET Framework 3.5 SP1.
    Wednesday, May 21, 2008 12:14 AM
  •  

    The stack trace points to old Pre Beta bits ,

     

    Resource not found.
       at Microsoft.Data.Web.WebUtil.CheckResourceExists(Boolean resourceExists)
       at Microsoft.Data.Web.RequestUriProcessor.ProcessRequestUri(String requestUri, IWebDataService service)
       at Microsoft.Data.Web.WebDataService`1.ProcessIncomingRequest()

     

    Can you please uninstall any old CTP bits of astoria and see if that helps.

    Wednesday, May 21, 2008 1:18 AM
    Moderator
  • Sounds good.  I'm reading through my Add/Remove programs but am not sure which one it is.  What name should I be looking for?
    Wednesday, May 21, 2008 4:51 PM
  • So I found it.  It was Microsoft ASP.Net 3.5 Extensions CTP.

    I think you should change your installer to remove that item upon a new install.
    Wednesday, May 21, 2008 5:24 PM
  • It work properly when I use linq 2 sql but failed when I use ADO.NET Entity Framework

    Friday, May 23, 2008 5:41 AM