We have a WCF service that uses Entity Framework to query a SQL database. The WCF service is our data access layer. If any of our applications what to read/write data to and from the database, we call a method on the WCF service. The WCF service serializes the EntityObjects to the client apps.
In the client app (e.g. WPF app or ASP.NET ...
All,
I'm a little new to WCF over IIS but have done some ASMX web services before. My WCF service is up and running but the helper page generated by the web service for me has the default names, i.e. the page that says:
You have created a service.
To test this service, you will need to create a client and use it to call the service. Y...
A project I am working on requires a structure as such:
{BasePrefix}/Application/{id}/Security/Users/{userId}
{BasePrefix}/Application/{id}/Objects/{objectId}
etc.
Application.svc would be end up being my WCF Web Service. I tried to convince them to do:
{BasePrefix}/Security/Application/{id}/Users/{userId}
This would allow me to ha...
I have this simple test project just to test the IncludeExceptionDetailInFaults behavior.
public class Service1 : IService1
{
public string GetData(int value)
{
throw new InvalidCastException("test");
return string.Format("You entered: {0}", value);
}
}
[ServiceContract]
...
I am developing a WCF service on my local computer using Visual Studios built in ASP.NET development sever and I'm having issues creating and using temporary Certificates.
I have created a cert call TempCA and added it to the Trusted Root Certificate folder and I have created another called SignedByCA which has been added to the persona...
Hi.
Consider the following picture representing the WCF channel stack:
I'm implementing my own channel and for that i already implemented the transport and encoding layer. Now i need to create a "protocol channel" layer where the messages should pass after created in encode layer and before get in the service layer.
I guess i need t...
I have a class Team that holds a generic list:
[DataContract(Name = "TeamDTO", IsReference = true)]
public class Team
{
[DataMember]
private IList<Person> members = new List<Person>();
public Team()
{
Init();
}
private void Init()
{
members = new List<Person>();
}
[System.Runtime.Se...
Hi,
I have code that builds a custom WCF wsdl on the fly. In one particular scenario, the WSDL exported should use the XmlSerializerOperationBehavior as the IWsdlExportExtension as opposed to the default DataContractSerializerOperationBehavior IWsdlExportExtension.
However, every time I try this from the WSDL generation code, I get a ...
Hi All,
I am a .NET programmer working with a Flash designer on a project. The design is that they will create a flash UI (implemented with AS2) to present a questionnaire. After it is completed by an end user, the will send me (a .net web service of some form) the answers to the questionnaire, I will perform a calculation, and I will...
I want to allow access to a WCF service to only those requests that contain a developer key. This is similiar to how the Google Maps API works. Register for a developer key and include that key in your requests.
Anyone can get a key. How you get a key is undecided but is being discussed. For now, we'll email you a key.
The service is u...
I have a WCF service (the same one) running on multiple servers, and I'd like to call all instances in parallel from a single client. I'm using ChannelFactory and the interface (contract) to call the service. Each service has a local <endpoint> client defined in the .config file.
What I'm trying to do is build some kind of generic frame...
I have a WCF service that is responsible for writing a log file. I would like to write a log file relative to the location of my WCF service. This service does NOT have an HttpContext available. Because of this, I cannot use HttpContext.Current.Server.MapPath.
How can I get the location of where my WCF service is running so that I can c...
We need to determine a quick way for our web application deployed in a DMZ to communicate to our SQL server that lives in the protected network. Only port 80 is open and available, and no direct SQL traffic is allowed across the firewall.
So take the following simple system.
A web page (default.aspx) makes a call (string GetData()) th...
I've browsed around the other articles on StackOverflow that relate to caching WCF proxies for reuse, and I've read this article explaining why I should explicitly open the proxy before calling anything on it. I'm still a little hazy on the best implementation details.
My question is: when should I open and close proxies for service ca...
Hi All,
I am working through some examples in a WCF book. There is a Host project and Client project within a single solution. Both are console applications. The Host is the startup app, but the Client app doesn't seem to open the Console like the book says. Book says while the Host is running, run the Client. The Run button is disabled...
why is it recommended to define service contract as an interface.
Any specific advantages over having them as classes?
...
We are working together with another firm. our application communicates with the other application through WCF on our side and a custom implemented java wsdl handler on the other side. They specify the wsdl format and one of the rules is that a specific string cannot contain more then 15 characters. (normally it's 60, but i take 15 for e...
What is the best practice when you need to authenticate specific OperationContracts, while using the default MembershipProvider for security (FormsAuthentication).
I guess that doing Membership.ValidateUser and Membership.GetUser just won't cut it when using WebServices, right?
In other words: How can I verify that a user is allowed to...
Hello all,
I'm trying to configure a WCF client to be able to consume a webservice that returns the following response message:
Response message
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://myserv...
I have a service exposed as WCF via NServiceBus. Ultimately, I'd like to call to this service from silverlight. My WCF Service Interface looks like this:
[ServiceContract]
public interface ISettingsService
{
[OperationContract(Action = "http://tempuri.org/IWcfServiceOf_RequestSettingsMessage_SettingsResponseMessage/Process", Reply...