Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Error execute RELEASE app

$
0
0

I did a web service and When I execute in DEBUG mode, it works! Enter to the TRY! But in mode RELEASE doesnt! Enter to the CATCH exception Somebody knows why?

try {           

            MercappEntities.Objeto_Usuario token = client.usuarioLoggeado (probaruser, probarpass);

            if(token!=null)
            {
                var entrada = new Intent (this, typeof(Home));
                entrada.AddFlags (ActivityFlags.ClearTop);
                entrada.PutExtra ("usuario", token.idUsuario);
                entrada.PutExtra ("correo", token.correo);
                entrada.PutExtra ("contra", token.contrasena);
                entrada.PutExtra("nombre", token.nombre);
                StartActivity (entrada);

            }

            else{
                pd.Dismiss ();
                AlertDialog.Builder builder2;
                builder2 = new AlertDialog.Builder (this);
                builder2.SetTitle ("Datos Incorrectos");
                builder2.SetMessage ("Datos incorrectos");
                builder2.SetCancelable (false);
                builder2.SetPositiveButton ("OK", delegate {
                    CloseContextMenu ();
                });
                pass.Text = "";
                builder2.Show ();   
            }

        } catch (Exception e){  

                pd.Dismiss ();
                    AlertDialog.Builder builder;
                    builder = new AlertDialog.Builder (this);
                    builder.SetTitle ("Error de conexión");
                builder.SetMessage (e.Message);
                    builder.SetCancelable (false);
                    builder.SetPositiveButton ("OK", delegate {
                        CloseContextMenu ();
                    });
                    pass.Text = "";
                    builder.Show ();
            }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>