locked
Voice Response Debugging Window RRS feed

  • Question

  •  

    I am attempting to use the Voice Response Debugging Window (VRDW) to test a VXML based Web Service in which I override the GetHandler from IHttpHandlerFactory and return my own VXML document during my own handler's ProcessRequest.  When I press the "Call" button on the VRDW it displays the following error:

     

    "The active project is a non-speech project.  If it is a speech project, please make sure the project file is not set as read-only"

     

    Initially I created the project as a VXML speech project through the wizard and tested with the VRDW which was successful.  Next I added the derived class of IHttpHandlerFactory and modified the web.config file to add the new handler factory.  When I attempted to use the VRDW, I get the error message above. 

     

    What constitutes a speech app to the VRDW?  Is there something I am missing in my project configuration? 

     

    Thanks.

     

    DK

    Thursday, May 10, 2007 8:01 PM

Answers

  • I have just tried to reproduce this and it works fine for me.  I'm using XP, haven't tried W2k3 as yet.  Here is what I did; hopefully this will help narrow down the problem.

     

    In Visual Studio, File->New Web Site->VoiceXML Speech Application

    Accept defaults.

    In Solution Explorer, Right click App_code->Add New Item->Class 

    Code Snippet

    public class HttpHandlerFactory : IHttpHandlerFactory, IHttpHandler

    {

        public HttpHandlerFactory() { }

        public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated) {

            return this; }

        public void ReleaseHandler(IHttpHandler handler) { }

        public bool IsReusable { get { return true; } }

        public void ProcessRequest(HttpContext context){

            context.Response.WriteFile("VoiceXml.vxml"); }

    }

     

    In Web.Config add:

    Code Snippet

    <httpHandlers>

        <add verb="GET,POST" path="default.aspx" type="HttpHandlerFactory" />

    </httpHandlers>

     

    In IE browse to http://localhost/SpeechVoiceXMLApplication/Default.aspx - returns the vxml

      

    In VS Debug->Windows->Voice Response Debugging Window

    Press Call

    Here 1st "Welcome" prompt.

     

    Tuesday, May 15, 2007 10:21 AM

All replies

  • I have just tried to reproduce this and it works fine for me.  I'm using XP, haven't tried W2k3 as yet.  Here is what I did; hopefully this will help narrow down the problem.

     

    In Visual Studio, File->New Web Site->VoiceXML Speech Application

    Accept defaults.

    In Solution Explorer, Right click App_code->Add New Item->Class 

    Code Snippet

    public class HttpHandlerFactory : IHttpHandlerFactory, IHttpHandler

    {

        public HttpHandlerFactory() { }

        public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated) {

            return this; }

        public void ReleaseHandler(IHttpHandler handler) { }

        public bool IsReusable { get { return true; } }

        public void ProcessRequest(HttpContext context){

            context.Response.WriteFile("VoiceXml.vxml"); }

    }

     

    In Web.Config add:

    Code Snippet

    <httpHandlers>

        <add verb="GET,POST" path="default.aspx" type="HttpHandlerFactory" />

    </httpHandlers>

     

    In IE browse to http://localhost/SpeechVoiceXMLApplication/Default.aspx - returns the vxml

      

    In VS Debug->Windows->Voice Response Debugging Window

    Press Call

    Here 1st "Welcome" prompt.

     

    Tuesday, May 15, 2007 10:21 AM
  • NB. I did initially have problems with the IHttpHandlerFactory; viewing default.aspx in IE gave the error "Could not load type HttpHandlerFactory from assembly System.Web" and, at the bottom of the page, "Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032 ".  Ensuring that the virtual directory was configured for .Net Framework 2.0 fixed this. 

    Since you state that it works fine in IE, I assume that this isn't your problem.

    Tuesday, May 15, 2007 10:36 AM
  • I have now tested this on Windows 2003 Server as well, and it works just fine there also.  The only way that I've been able to reproduce this problem is to make vwd.webinfo readonly. 

    Ensure that vwd.webinfo is not read-only, and re-load the solution in Visual Studio.

    Tuesday, May 15, 2007 4:04 PM