WCF client error: You are not allowed to call this method

Nov 13 2009 8:45 AM
Hi, I'm a newbie to WCF. I have to consume a third-party web-service (so I have no source, no control over it, address is something like https://aztdirect.allianztiriac.ro/SharedWebServices.Dev/QuotationManagementService.svc), so I have to call it from a Visual Studio 2008 application (I work on Windows XP SP3, .NET 3.5 Framework, C#). I added a service reference from my app, visual studio created proxy class and config file for me. I instantiated the proxy class but when I try to call a service method, it gives me the FaultException: "You are not allowed to call this method". OK, I said, errors happen, not big deal, but the big surprise was that I cannot google it, it seems nobody ever got this error! Shouldn't be some classic error sent by the service or something? So I'm blocked, please help me. Here is the generated config file: The vendor of the web-service confirmed to me that client credentials are not needed to call the service. Here is the code from my client: private QuotationManagementServiceClient m_AllianzWS; try { m_AllianzWS = new QuotationManagementServiceClient(); string rez = m_AllianzWS.CreateQuotationRco("somedumbstring"); } catch (TimeoutException timeProblem) { Console.WriteLine("The service operation timed out. " + timeProblem.Message); m_AllianzWS.Abort(); } catch (FaultException faultEx) { Console.WriteLine("An unknown exception was received. " + faultEx.Message + faultEx.StackTrace ); m_AllianzWS.Abort(); } // Standard communication fault handler. catch (CommunicationException commProblem) { Console.WriteLine("There was a communication problem. " + commProblem.Message + commProblem.StackTrace); m_AllianzWS.Abort(); } catch (Exception ex) { Console.WriteLine("Classic exception: " + ex.Message); if (ex.InnerException != null) Console.WriteLine("Inner exception: " + ex.InnerException.Message); } finally { m_AllianzWS.Close(); }

Answers (2)