WCF RIA service - wcf

having the following issue with newly created RIA service:
system.servicemodel.domainservices.client.Domainoperationexception:
load operation failed for query 'GetUser'.
Why did the project automatically inlude the UserRegistrationContext service anyway? Can anyone please help?

I have seen this issue many times and there are so many reasons for the same.
Secondly as soon as you create RIA service, VS automatically generate the proxy code in SL application. You can find the proxy code under generatedcode folder in your solution.

Related

Unable to add Java service reference to WCF client

I am uanble to add the below Java service reference in WCF Client
https://filetransfer.nordea.com/services/CorporateFileService
getting below error .
There was an error downloading 'https://filetransfer.nordea.com/services/CorporateFileService/$metadata'. The request failed with the error:
I opened the port 8000. still getting same issue.
Please let me know what is the issue.
Thanks
Jaya
Please note that a WCF service normally expose a file called a WSDL(Web Services Description Language) - this file explains the methods that you will use with the service
https://www.w3.org/TR/2001/NOTE-wsdl-20010315
Normally an endpoint needs to be created and be accessible for ypu to be able to view the service, what I would suggest is that if WCF doesnt seem to be doing that for you, try adding the service as a webservice Reference in your C#/Java project.
https://www.blackbaud.com/files/support/guides/infinitydevguide/Subsystems/infGC-developer-help/Content/AddingWebReference.htm

Configure SSRS delivery extension for invoking a WCF service

Have created a custom delivery extension in SQL Server Reporting Services (2008 R2). Within the custom delivery I am making a call to a WCF service. Am not sure where to put the app.config settings for the WCF bindings.
Have tried adding the entire 'system.serviceModel' section into the Reporting Server config file (rsreportserver.config). Have also added the generated app.config file from the custom DLL into the report server's /bin folder. Am still getting the following error though.
Could not find default endpoint element that references contract 'name of my WCF service' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
For now I am changing the code to create the bindings through code but would rather have this config file based. Any help is greatly appreciated.
Thanks
David
A. I would just create a proxy class of SSRS service objects in code.
B. Then make your own wrapper code for creating a report or getting report info. I explained this in another question here:
Programmatically Export SSRS report from sharepoint using ReportService2010.asmx
C. Then build a service around those wrapper methods to get your data.

How to add service to a WCF Service library. Is this correct?

I am new to WCF and .Net application. So pardon me if I am asking some basic and silly question.
Basically my project is to create a WCF Service that would call an Oracle Stored Procedure that returns a set of parameters which is then passed to the Exchange Server to send Email.
For this so far I have done something like this:
In VS 2010 Create Project; Visual C#; WCF; select WCF Service Library.
Described as "A project for creating a WCF service class library (.dll)".
Gives an app.config
Debug brings up a WCF Service Host and a WCF Test Client automatically.
I initially followed the MSDN sample that is given below in the following website:
http://msdn.microsoft.com/en-us/library/ms731835.aspx
Now I Added another project to the same solution and chose WCF Service Application to host the above in IIS host. This gives me web.config file.
Before I proceed to my next question please let me know if the last step is correct or wrong?
To proceed further I tried to add my implementation service reference in web.config file.
When I try to debug I am getting a Service host that is running seperately (an icon on my machine) and a WCF Test Client opens up as well. Is this correct? Now how do I proceed further? I have no clue..
Now do I create methods that would call the Stored Procedure using Data access?
How do I proceed further? I am stuck. Please help.
Thank you.
You are on right path you just need to call your stored procedue and then call read the data and invoke method and pass it to client.
Here is full example with screenshot for your help
SQL Server
http://www.codeproject.com/Tips/468354/WCF-example-for-inserting-and-displaying-data-from
WCF Data Services and OData for Oracle Database
http://download.oracle.com/oll/obe/EntityFrameworkWCF/WCFEntityFramework.htm
Invoking Operations on the Oracle Database WCF
http://msdn.microsoft.com/en-us/library/dd788075%28v=bts.10%29.aspx

"Add Service Reference" reference.svcmap and ServiceReference.ClientConfig empty

I have an ASMX service that I wan't to add to my Silverlight project (in the near future this will be converted to a WCF service).
When using the "Add (or Update) Service Reference" not all the files seem to be created and files under Reference.svcmap aren't created and the ServiceReferences.ClientConfig is empty.
Has anyone ever come across this before?
Not sure I have a good answer for this one. I see this every so often. Usually the problem can be traced by looking at the output window entires that occured during the attempted proxy generation.
Sometimes it is caused because invalid or unsupported Wsdl or just some silly issue with serialization of one of the types.
Try to give your client (Silverlight) application the WSDL, not just the ASMX when adding the service reference.
e.g. http://myserver.com/services/mywebservice.asmx?wsdl
Remove the service reference altogether from your client project, and try adding it again this time with the WSDL.

Silverlight WCF service acting strange

I have a silverlight project that calls into a wcf service. Everything works fine on my local machine.
However when I deploy to a virtual machine, with the exact same query the wcf service returns, but the result is empty.
I've tried debugging, but have not been able to get it to break in the wcf service.
Any ideas what the problem could be, or how I could go about debugging it?
Thanks
I figured out what the problem is, but am not sure what the solution is.
In my silverlight project the wcf service I am referencing is http://localhost/.../SilverlightApiService.svc
I used fiddler on my vm to see the request that was made and instead of trying to contact the above service, it was trying to contact:
http:///.../SilverlightApiService.svc
So, for some reason my machine name is getting inserted in there instead of localhost. Any thoughts on this would be appreciated.
I had this exact problem when deploying to amazon ec2 - The machine name for the service was being returned in the wsdl rather than the dns.
There were a couple solutions (one involved creating static wsdl - yuck!)
But the other was creating a sort of factory pattern for the service
This thread (you can read it all, but the answers are at the bottom.)
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c7fd51a2-773e-41d4-95a0-244e925597fe/
The slight downfall with this is that although it works - if you change the location of the server, you will need to remember to update your config - Which although isn't hard, it's easy to forget to do.
Can you give us a bit more information? What kind of binding are you using? What does the service config and the client config look like? Where do you get your data from that gets returned? Could it be the service on the VM just doesn't get any data? (e.g. queries a database that just doesn't have the data requested?)
Marc
I have had that happen before. I would try this. Set you start page as the web service file and run the app. Then set the start page back to your default page. Then update all the server references in your SL project. Recompile everything and republish. This has helped me a bunch of times in the past.
I figured it out.
Basically my machine name was hard coded in my ServiceReferences.ClientConfig file in my silverlight project.
What I had to do was specify programmatically what url to use for the service reference when instantiating my service client:
System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress(new Uri
(Application.Current.Host.Source, "../WebServices/SilverlightService.svc"));
ServiceClient serviceClient = new ServiceClient("BasicHttpBinding_IService", address);
I figured out what the problem is, but am not sure what the solution is.
In my silverlight project the wcf service I am referencing is http://localhost/.../SilverlightService.svc
I used fiddler on my vm to see the request that was made and instead of trying to contact the above service, it was trying to contact:
http:///.../SilverlightService.svc
So, for some reason my machine name is getting inserted in there instead of localhost. Any thoughts on this would be appreciated.