开发者

First try wcf data service always times out from client

I have read all other posts and have been googling this for the last 2 hours! I started WCF Data Services about 3 hours ago btw.

My service is on an asp.net4 app, the ado entity model exposes an sql server db.

Here is FasDataService.svc.cs

public class FasDataService : DataService<FASStoreEntities>
{
   public static void InitializeService(DataServiceConfiguration config)
   {
      config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
      config.UseVerboseErrors = true;
      config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
      config.SetEntitySetAccessRule("*", EntitySetRights.All);
   }
}

I have then a winforms 4 app with the following code in the Main()

FASStoreEntities fas = n开发者_StackOverflow中文版ew FASStoreEntities(u);
var a = from al in fas.Customers 
        where al.Name == "Alinio"
        select al;
MessageBox.Show(a.First().Phone1);

When I run the web app and point to http://localhost:15995/FasDataService.svc/Customers(1) it loads up the one and only customer in there

My error is WebException was unhandled:

The operation has timed out. The inner exception is null.

Also, everything is local but when I do this (in chrome) it takes a good load of time! Its scary to think of how it would perform in production?


For some reason, today I installed fiddler and tried it and it works! I also, queried the service with linqpad and it worked no prob!

Although throughout today I played with wcf data services and had tons of problems accessing data because of all kinds of errors, data connection was still open, some error insert excess data in a field etc etc.

Fiddler was very helpful at diagnosing what the error was, its very difficult to figure out what really went wrong so fiddler is a must have.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜