| Shreeman's profileShreemanBlogLists | Help |
|
December 05 Adonet DataService gotchas The server encountered an error processing the request. See server logs for more details
Also make sure
Tools--internetoptions--content--feed setting and clear the turnon feedreading view
Also make sure when you are browsing the url type in correct case..yes the rest uri here is case sensitive.
You are having issue with integrating Linqtosql with Adonet dataservice??
Make sure you enable tthe logging and check the details using traceviewer.exe:-
<system.diagnostics >
<sources>
<source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing" > <listeners> <add name="ServiceModelTraceListener"/> </listeners> </source> <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing" > <listeners> <add name="ServiceModelTraceListener"/> </listeners> </source> <source name="System.Runtime.Serialization" switchValue="Verbose,ActivityTracing"> <listeners> <add name="ServiceModelTraceListener"/> </listeners> </source> </sources> <sharedListeners> <add initializeData="App_tracelog.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelTraceListener" traceOutputOptions="Timestamp"/> </sharedListeners> </system.diagnostics> Its Provide pretty details of the error :-
For me it was the dataService Key Attribute which were needed to be applied to the Northwind--orderdetails PK
If you are hosting it in IIS make sure that the accout has permission to the SqlServer DB.
If you are calling from Silverlight Clients :- You can see it returns extra results,thus do column binding accordingly.
Also , you can use stored proc to provide the necessary multiple joins to rescue from big load.
Consider the Expand option and consider the delay load carefully.
Be aware of the default connection string if you have multiple services in same project.By default you can expect to see all the data from both data context.For details look into MSDN for connectionstring in Ado.net dataService.
WCF- REST-SOAP -Few Tricks and few Links-Part11. REST GET with StringArray as Input parameter to Get Method:-
Define same service with 2 endpoints one for webhttp for rest and one for soap.
let the service accept a string array.
Now when you browse the service it ll throw error 'System.String[]' is not convertible by 'QueryStringConverter since rest method does not support the string array as input parameter.
see the list here http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.querystringconverter.aspx
<endpoint address="secure" binding="basicHttpBinding" contract="SilverlightApplication1.Web.EmployeeService" />
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="webBehavior" contract="SilverlightApplication1.Web.EmployeeService" /> The issue is although the soap works fine..once you define mutiple endpoint it does not work.The way to work around this is for soap you can pass the bindig name ehile instantiating the proxy.For REST the easiest alternative is to pass deleted string and parse it.Although this always pose a limitation,you have live it with.
Another quick around is to use this :-How to: Create a Service That Accepts Arbitrary Data using the WCF Web Programming Model
Do note that you can pass Array or custom objects to PUT and POST but not to get method.So if you have the following:-
l[WebGet]
public IEnumerable<Employee> SearchEmployeeByRandomFields(String strSearch, string[] retFields)
{ -- search operation code -- }
you ll get Request Error - The server encountered an error processing the request. See server logs for more details
2.Quick REST Learning Resources:-
WCF REST Starter kit :- http://msdn.microsoft.com/en-gb/netframework/cc950529.aspx
|
|
|