Hi,
I have started playing around with Wcf Ria Services with silverlight. All was working until this morning.
For some reason I get HttpContext.Current as null in the call:
private static bool OwnsFile(string virtualPath)
{
if (!virtualPath.EndsWith(".svc", StringComparison.OrdinalIgnoreCase))
{
return false;
}
if (!VirtualPathUtility.ToAppRelative(VirtualPathUtility.GetDirectory(virtualPath)).Equals("~/Services/"))
{
return false;
}
if (File.Exists(HttpContext.Current.Server.MapPath(virtualPath)))
{
return false;
}
string fileName = VirtualPathUtility.GetFileName(virtualPath);
return domainServiceTypes.ContainsKey(fileName);
}
Which is in DomainServiceVirtualPathProvider.cs (system.web.ria.dll) which is from reflector pro.
Before I got the error I created a services folder in my Asp.net server app but then deleted it (not sure if that is related).
The error occurs when I call (on the client) :
SL3NavigationProject.Web.EchoDomainContext edContext = new SL3NavigationProject.Web.EchoDomainContext();
So it is using the default settings for endpoints.
Any ideas?
JD
Ps. I am using Silverlight 3 with vs2008.