Webservices 2009, SQL Connection fail after SoapException


we have a BIG Problem!

The Setup

Three Tiers on three Machines. That means, that SQL Server is on different Machine than Service Tier.
Delegation is Set up und running. That’s allright.

A .NET Mobile Client that consumes the service.

The Error

Say, you have a Codeunit with a Function that you publish as Webservice (registerInvoice) ok?

Somewhere in the navision code you have an ERROR(“The Code yx is missing”). ok?
In this case a SoapException in the mobile client is thrown.
Good, until now we had no problem with connecting to service and sql server and do some other
consumation of nav services…

As soon as there is a soap exception (as a result of the errormessage in the nav code), the connection to sql server is not working anymore!!
The only thing that brings the client to connect again to sql server. is to run the url ex.(http://lpa-srv-mit-01.primevision.net:7 … 20(Schweiz%20AG/Codeunit/MobileDatenerfassung)of the webservice
in the browser. After that it works again?!!?

You would probably want to look into your NAV code and handle these errors.
Instead of throwing an ERROR in the situations, perhaps trigger some other code.
You can use the combination of the system variables ISSERVICETIER and GUIALLOWED to detect wether the code is executed as a webservice.