TheDucklord
TheDucklord
CC#
Created by TheDucklord on 7/1/2023 in #help
❔ ✅ Program crashing outside of dev environment.
Hey all. Thank you all for creating a community like this. I very much appreciate that I can ask questions here. Hopefully someone has come across this before. I've been trying for weeks to figure this out.
So wha'ts happening is that a program I wrote works fine when building and running it from inside VS, but once I release it, or try to run the debug version outside of VS, it dies at a specific line of code. It seems to be here... HttpResponseMessage httpReply = await client.SendAsync(request); This is what request is HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, url); request.Content = new StringContent($"client_id={clientId}&client_secret={clientSecret}&code={authCode}&grant_type=authorization_code&redirect_uri=http://localhost:3000"); request.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/x-www-form-urlencoded"); Works 100% when running from VS, but outside, fails right there. has anyone seen this before or knows how to get this fixed? Would really appreacate this.
30 replies