Hi there,
Thanks for offering that tool for free. It's the easiest solution to run a 64 bits web server.
The proble I have is that my WCF Data Service is not working with your web server.
Create an empty web project.
Add WCF Data Service and insert the following code... Then run and browse that .svc page. Very easy to reproduce.
You should get this:
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<service xmlns="http://www.w3.org/2007/app" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xml:base="http://localhost:43215/WcfDataService1.svc/"> -<workspace> <atom:title>Default</atom:title> -<collection href="Teams"> <atom:title>Teams</atom:title> </collection> -<collection href="Groups"> <atom:title>Groups</atom:title> </collection> </workspace> </service>
Whereas you get an empty HTML page. Meaning I' stuck because I need the 64 bits webserver and WCF Data Services ;)
Thanks,
John.
Here is the code of the svc dummy service:
using System;
using System.Collections.Generic;
using System.Data.Services;
using System.Data.Services.Common;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;
namespace WebApplication1
{
[EntityPropertyMapping("Name",
SyndicationItemProperty.Title,
SyndicationTextContentKind.Plaintext,
false)]
[EntityPropertyMapping("Odds",
SyndicationItemProperty.Summary,
SyndicationTextContentKind.Plaintext,
false)]
public class Team
{
public static List<Team> Teams = new List<Team>{
new Team {ID = 1, Name = "New Zealand", Odds = "1:1000"},
new Team {ID = 2, Name = "Paraquay", Odds = "1:50"},};
public int ID { get; set; }
public string Name { get; set; }
public string Odds { get; set; }
}
[DataServiceKey("Name")]
[EntityPropertyMapping("Name",
SyndicationItemProperty.Title,
SyndicationTextContentKind.Plaintext,
false)]
public class Group
{
public static List<Group> Groups = new List<Group>{
new Group {
Name = "A",
Teams = new List<Team>{
Team.Teams[0],
Team.Teams[1],
Team.Teams[2],
Team.Teams[3]
}
},
new Group {
Name = "B",
Teams = new List<Team>{
Team.Teams[4],
Team.Teams[5],
Team.Teams[6],
Team.Teams[7]
}
},
};
public string Name { get; set; }
public List<Team> Teams { get; set; }
}
public class WorldCupData
{
public IQueryable<Team> Teams
{
get
{
return Team.Teams.AsQueryable();
}
}
public IQueryable<Group> Groups
{
get
{
return Group.Groups.AsQueryable();
}
}
}
public class WcfDataService1 : DataService<WorldCupData>
{
// This method is called only once to initialize service-wide policies.
public static void InitializeService(DataServiceConfiguration config)
{
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.SetEntitySetPageSize("*", 100);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
}
}
}
PS: it also cool to be able to post to the forum as a guest ;)