TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark Tabor
554
2k
465.1k
async Action Result does not end
Jan 7 2020 4:15 AM
hi I have a requirement in which i am updating the token number i am using SpeechSynthesizer but after the sound play my is not returning it is in blocking mode and never end execution.
public
async Task<ActionResult> UpdateCounter(Counter counter)
{
using
(CounterAppForANTHEntities1 entities =
new
CounterAppForANTHEntities1())
{
Counter updatedCustomer = (from c
in
entities.Counters
where c.id == 1
select c).FirstOrDefault();
updatedCustomer.Counter_value = updatedCustomer.Counter_value+1;
Console.Beep(767, 800);
entities.SaveChanges();
SpeechSynthesizer synthesizer =
new
SpeechSynthesizer();
synthesizer.Rate = 0;
synthesizer.Volume = 100;
int
res = updatedCustomer.Counter_value;
string
value =
"Token Number"
+ IntToString(res);
//await Task.Delay(3000);
synthesizer.SpeakAsync(value);
return
View(updatedCustomer);
// return RedirectToAction("Index");
}
return
RedirectToAction(
"Index"
);
}
Reply
Answers (
1
)
Upload file with model in Asp.net web api using fiddler
How do i disable swashbuckle swagger UI in production in asp