views:

525

answers:

1

I'm working on two websites. One is an existing classic asp site which posts xml to a new asp.net (.net 3.5) website. The classic asp site is using msxml's serverxmlhttp object in vbscript to send this xml over. The whole thing works until I make a seemingly unrelated change to the asp.net site.

When I add a few lines of code that uses System.Speech.Synthesis to generate a wav file from text the classic asp websites serverxmlhttp.send command times out. As far as I can tell the asp.net page is working fine, it makes it through the few new lines of code without an issue (the wav file is generated). The few lines of speech code causing the issue is done well before the timeout.

It seems like the asp.net page was actually sending some sort of acknowledgement back to the classic page which is no longer getting sent. I should also point out that the speech code was throwing an exception saying it needed to be asynchronous which I fixed by adding Async="true" to the . However, it works when async="true", it's just those speech lines that break it. The "problem code" is just

SpeechSynthesizer speaker = new SpeechSynthesizer();
            speaker.Volume = 100;
            speaker.SelectVoiceByHints(System.Speech.Synthesis.VoiceGender.Female, System.Speech.Synthesis.VoiceAge.Adult, 0);
            try
            {
                speaker.SetOutputToWaveFile("c:\\test\\output.wav");
            }
            catch (Exception ex)
            {
                retVal = false;
            }
            speaker.Speak(msgText);
            speaker.SetOutputToDefaultAudioDevice();

Does anyone have any suggestions on what could be wrong or what I could use to help debug this?

A: 

It seems like the asp.net page was actually sending some sort of acknowledgement back to the classic page which is no longer getting sent

It sounds like you should investigate it more so you can tell us server's response behavior before and after. Also please indicate the exception thrown.

My guess would be these APIs don't work well in a service process. I have no clue though really. I'm curious about the exception, you're not clear about what you made async.

Frank Schwieterman