I am trying to self host a WCF services and calling the services via javascript. It works when I pass the request data via Json but not xml (400 bad request). Please help.
Contract:
public interface iSelfHostServices
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = INFOMATO.RestTemplate.hello_post2,RequestForma...
Does anyone know of a good (read: quick to code) method for converting DTOs to View Models or mapping DTO members to View Model members? Lately I've been finding myself writing many conversion and helper methods but this is a very arduous and tedious task. Moreover, it will often needs to be done twice (DTO -> View Model, View Model -> D...
I'm interested in one WCF server exposing both HTTP and TCP interfaces. It'll be used with Silverlight clients, so the thinking is that the HTTP interface will be for secure communications while TCP will be used the rest of the time.
Is it possible for these two interfaces to use the same port in their endpoints, e.g. http://localhost:...
In some enterprise-like project (.NET, WCF) i saw that all service contracts accept a single Request parameter and always return Response:
[DataContract]
public class CustomerRequest : RequestBase {
[DataMember]
public long Id { get; set; }
}
[DataContract]
public class CustomerResponse : ResponseBase {
[DataMem...
I am having trouble in configuring WCF service to run in session mode. As a test I wrote this simple service :
[ServiceContract]
public interface IService1
{
[OperationContract]
string AddData(int value);
}
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
internal class Service1 : IService1,IDisposable
{
...
I spent a long time learning how to customise WCF from the point of view of adding authentication etc over a RESTful service; I built some custom service hosts, then added the ability to use an IOC container to actually create the service instance etc etc.
We have iPhone/iPad apps plus some other gadgety-type things (technical term!) th...
Hi all,
I'am newbie in WCF Services. I Have asp.net page, and call it WCF Service (basic http binding).
In my WCF Service, I need get the asp.net context of user.
Any sample about it ?
how can I config the client and service ??
and what code source can I use ??
Greetings, thanks in advanced
...
Hi All,
I am looking to write some integration tests to compare the WSDL generated by WCF services against previous (and published) versions. This is to ensure the service contracts don't differ from time of release.
I would like my tests to be self contained and not rely on any external resources such as hosting on IIS.
I am thinking...
Hello, There is self - hosted WCF server (Not IIS), and was generated certificates (on the Win Xp) using command line like
makecert.exe -sr CurrentUser -ss My -a sha1 -n CN=SecureClient -sky exchange -pe
makecert.exe -sr CurrentUser -ss My -a sha1 -n CN=SecureServer -sky exchange -pe
These certificates was added to the server code ...
Here is my scenario, and it is causing us a considerable amount of grief at the moment:
We have a vendor web service which provides base level telephony functionality. This service has a SOAP api, which we are leveraging to build up a custom UI that is integrated into our in house web apps. The api functions on 2 levels. You make standa...
Hi all.
One day I decided to build this nice multi-tier application using L2S and WCF.
The simplified model is : DataBase->L2S->Wrapper(DTO)->Client Application.
The communication between Client and Database is achieved by using Data Transfer Objects which contain entity objects as their properties.
abstract public class BaseObject
...
I have 2 classes: Person and Contact.
Person class has a property named ContactNumber which returns the Contact type, and this property is marked as a DataMember for serialization.
I have marked Contact type as a DataContract.
On the client side I am able to get the values, but when I try to insert a value and then do submit, I get the...
Hi there,
can anyone help?
I recently had asp.net membership setup using a connection string to my db via the web.config in my service layer. It enabled me to do something like this :-
public bool IsValidLogin(string username, string password)
{
return System.Web.Security.Membership.ValidateUser(username, password);
...
I've just built an EF model over a db (Framework 3.5 sp1), and I want to create a WCF Data Service to deploy it.
No problem with the entities, but now I've created a service operation like this:
[WebGet]
public IQueryable<person> PersonsGetAll()
{
return this.CurrentDataSource.persons;
}
and I've setted in InitializeService:
conf...
I have created one WCF service , which is working fine, now i want to consume it in a client application.
using SVCutil.exe i have generated proxy and aap.settings for that service and added that to the client sln(console application)
But the problem is i am unable to access the wcf methods.
using System.ServiceModel;
...
I am trying to access an old ASMX webservice using WCF by calling the ChannelFactory.CreateChannel() method.
If the web service is created by WCF, everything is straightforward. I can instantiate the proxy client generated by the svcutil tool, or manually call the ChannelFactory.CreateChannel() method. Afterwards, I can call the web ser...
I have a service being hosted in IIS on XP via fileless activation. The service starts fine when there is no SSL port enabled for IIS but when the SSL port is enabled, I get the error message:
System.ServiceModel.ServiceActivationException: The service '/SkillsPrototype.Web/services/Linkage.svc' cannot be activated due to an except...
I'm still a newbie with wcf and not too well informed in .net in general. I have a WCF 4 web service that uses the global.asax routing approach and very simplified web.config using the standard endpoint method. This wcf service runs as an application with the default web site on iis 7.5 at present. I need it support both http and http...
I created a WCF SOAP service using VS 2008 that works server side. I tacked on the code below to call the same service/contract client side using jQuery/json (no ASP.NET scriptmanager). When I put the service url into the browser, I get the correct service page and when I invoke the service from javascript and trace via Firebug, I get ...
Is there a way to route traffic to a target WCF service file based on the URL domain requested?
Basically, I have a single WCF RESTful services project with 3 service files offering different endpoints. It's hosted on a single IIS6 site looking for multiple host header values on port 80. I want to route traffic to different services fi...