Archive for the ‘WCF’ Category

h1

Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.

September 1, 2008

I obtained this error when i tested my WCF Service.

Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.

Solution

IIS->select virtual directory with services -> Properties -> Directory Security tab-> Edit… -> Check Integrated windows authentication. Uncheck Anonymous access.

Then open command line and execute iisreset

h1

Agenti v .NetTiers, pres WCF

April 3, 2008

Agenti jsou servicy, ktere periodicky spousteji nejaky kod. Napriklad prepocitavani priorit tasku, generovani tasku atd…
Dulezitym prvkem je to, ze kod, ktery agenti vykonavaji je lepsi drzet na strane orchestraci.
Proc?? 
Pokud budeme volat kod na strane agenta (client-side), musime resit serializace (napriklad serializaci CaseQuery, ktery posilame service).V agentovi volame servicy ktere jsou na strane serveru. Musime si uvedomit, ze neni mozne volat primo servicy z Aplikace, ktera bezi na localhostu. Tim myslim nevolat

IService service = new Services.Service()

Musime volat pekne pres WCF servicy, ktere jsou ne na localu, ale na strane aplikace:

IFutureActivityService futureActivityService = WcfClient.ProxyFactory.Orchestrations.FutureActivityProxyInstance();Potom ale nesmime zapomenout endpointy v App.configu.

Dale je vhodne zvazit, jestli uz operace nad DB nevolat primo v SQL procedurach. Opet si tim muzeme usetrit spousty prace. Udelat join pres vice jak dve tabulky je v .Nettiers preci jenom orisek. Pokud chceme volat spolecne s nasi metodou Workflow, pouziti trored procedur zase nemusi byt nejlepsi napad. Tim myslim, volat z SP workflow. furtn nam ale SP mohou velmi zjednodusit zivot. Dalsi vyhodou pro pouziti servis na strane aplikace je fakt, ze se to mnohonasobne lepe testuje. Jenom zavolate metodu servicy v unit testu. Nejakeho agenta neresite.  
 

  • Zkratka agent by se mel postarat pouze o spusteni metody v orchestraci a na nejakou dobu skoncit. Nic vic, nic min. Usetrime si tim mraky casu.
  • Vsechna logika musi byt na strane orchestraci, usetrime si ohromna kvanta prace!!
  • Vzdy zvazte pouziti Stored procedur, pokud agent dela hromadne operace nad DB.
      
h1

Authorisation problem, when could not open .svc in Explorer

March 14, 2008

Once time I obtained this error:

Authorisation problem, when could not open .svc in Explorer
The type  in conflicts with the imported type in . Using the one in
Warning 27 The type C:\…\SmartClient.Cases.IShowModalCommercialIncidentView’ in ‘C:\…\SmartClient\…\IShowModalCommercialIncidentView.cs’ conflicts with the imported type ‘TeamTrackers.Fenix.Applications.SmartClient.Cases.IShowModalCommercialIncidentView’ in ‘c:\Workspace\Latest\TeamTrackers.Fenix.Applications\SmartClient\bin\Debug\Cases.dll’.
 

Solution:

Set integrated Win authentication checkbox in  IIS to true.

 

iis2.png