0
I have an app on Xamarin android that consumes a wcf service, when I instate the service more than 10 times the service falls and you need to restart it and when it will restart the bar you need to go through the middle to stop the service and then start charging a little more to start. I don’t know what I might be doing wrong because I always give Dysplasia() in the methods so I believe it’s not that, someone can help me please??
public void Conectar(int chaveAdministrador, string cnpjEstabelecimento, string IP, string NomeBanco)
{
sPropriedades ws = new sPropriedades();
ws.Url = "http//"+IP+":2704/Fontes/"
ws.CarregarBase(chaveAdministrador, cnpjEstabelecimento, IP, NomeBanco);
}
When I run this function more than 10 times next it does not answer anymore, then I have to restart the service on the PC
This is Class Ownership in Service
ServiceContract(SessionMode = SessionMode.Allowed)]
public interface IsPropriedades
{
[OperationContract]
void CarregarBase(int chaveAdministrador, string cnpjEstabelecimento, string IP, string NomeBanco);
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class sPropriedades : IsPropriedades
{
public void CarregarBase(int chaveAdministrador, string cnpjEstabelecimento, string IP, string NomeBanco)
{
c_Propriedades.IP = IP;
c_Propriedades.NomeBanco = NomeBanco;
c_Propriedades.ChaveAdmin = chaveAdministrador;
c_Propriedades.ChaveEmpresa = chaveAdministrador + "|1|" + cnpjEstabelecimento;
c_Propriedades.ChaveCaixaDoTurno = c_Caixa_DB.BuscarChaveCaixaTurno();
c_Propriedades.TurnoAberto = c_Caixa_DB.BuscarSituacaoTurno();
c_Propriedades.Parametros = c_Parametros_DB.BuscarParametroFood();
}
}
it’s hard to get an idea without seeing the code of your app and service, post your code in the question
– Ricardo Pontual
First I referenced the service in the reference of the .droid. Example of the code...
– rodode
we need to see the service code to understand the implementation... services do not "fall" so there must be some resource error stuck, objects not released, something like that in your code
– Ricardo Pontual
please edit your question and put this comment on the question, such as client code, and also show the service code
– Ricardo Pontual
Please enter the class code.
– perozzo
Do you need any more information? I thought it was session problem but I increased the amount in App.config and still does not respond after 10 times it seems that the service gets loaded
– rodode