Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7195

app crashes immediately without giving any information in the debug

$
0
0

I am trying to run search Function in app and it crashes immediately without giving any information

my mvvm code

var userSearch = _apiServices.SearchEmailansPasswordUserAsync(Email , Password,accesstoken);

my Data Services

        public async Task<data.UserT> SearchEmailansPasswordUserAsync(string email, string pasword, string accessToken)
        {
            RestClient<data.UserT> restClient = new RestClient<data.UserT>();
            var userInformation = await restClient.SearchEmailandPasswordUser(email, pasword, accessToken);
            return userInformation;

        }

my rest Client code

public async Task<T> SearchEmailandPasswordUser(string email, string pasword, string accessToken)
        {
            var httpClient = new HttpClient();
            httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);                    
                var json = await httpClient.GetStringAsync(publicUrl + "api/UserCredentials/email=" + email + "/pasword=" + pasword);//code crashes her 
            var taskModels = JsonConvert.DeserializeObject<T>(json);
                return taskModels;                                                   
        }

this is my user Controller in api

 [HttpGet]        
        [Route("api/UserCredentials/email={email}/pasword={pasword}")]
        public async Task<IHttpActionResult> SearchUseremail(string email ,string pasword)
        {

            UserT login = await db.UserTs.Where(x => x.Email == email && x.Password == pasword).SingleOrDefaultAsync();

            if (login == null)
            {
                return NotFound();
            }
            return Ok(login);
        } 

**the line of code that crash **

var json = await httpClient.GetStringAsync(publicUrl + "api/UserCredentials/email=" + email + "/pasword=" + pasword);//code crashes her

I hope any one can help my


Viewing all articles
Browse latest Browse all 7195

Trending Articles



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