I received code written in .NET and Angular and made a change to the registration process. I replaced the existing SMS/Email sending mechanism with a new one that uses an API call. After publishing the app, the site loads correctly, but SMS/email sending fails when running on IIS Local. However, if I run IIS Express in the background from within Visual Studio, the sending works both from the published site and from the local host. As soon as I stop running IIS Express in Visual Studio, SMS and email sending fails again from the published site.
Why does running IIS Express affect IIS Local, and why does SMS/email sending not work from the published site when IIS Express is not running in the background? I hope it’s clear.
For reference, here is the code I edited for the API call:
request = new RestRequest("send-sms", Method.Post) { RequestFormat = DataFormat.Json };
request.AddJsonBody(new
{
MessageText = otpMsg.Body,
SenderName = otpMsg.SenderName,
RecipientPhone = otpMsg.To
});
var response = _client.Execute(request);
Thanks in advance for any help!
Not really sure what to try as I’m new to this.