n-tier entity framework generated code and wcf authentication http://ntieref.codeplex.com

StackOverflow https://stackoverflow.com/questions/22648986

  •  21-06-2023
  •  | 
  •  

Pergunta

Hi created my service using http://ntieref.codeplex.com/ n-tier entity framework.

The service the generator created uses wcf and wsHttpBinding. It uses windows authentication and the program created works fine when the user is logged in the Domain (as it should). My problem is when I am trying to connect from "outside". I could not find a way to pass something like this:

client.ClientCredentials.UserName.UserName = "SomeUserName";
client.ClientCredentials.UserName.Password = "WrongPassword";

thats why my call fails with the user not validated.

My question is specific to n-tier entity framework (http://ntieref.codeplex.com/) with the default generated. That's why I am not posting configs. If some one has experience on this framework please help. I would like to also expose some functions of my own written on the server to the clients (beyond the entity generated functionality) (e.g. a login function that will return some custom class after validation) without breaking the existing functionality.

Where should I write my code ?

Foi útil?

Solução

WCF Endpoint Configuration

The n-tier entity framework generates plain vanilla WCF services which can be exposed through any WCF endpoints. All you need to do is setting-up corresponding endpoint configurations in your config.


Custom Service Methods

Both, service contracts and implementation are generated as partial interfaces and classes. This allows to add additional custom services methods as required.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top