Web references and AppVerifier

Discussion in 'ASP .Net Web Services' started by Kevin, Mar 22, 2006.

  1. Kevin

    Kevin Guest

    Hello,

    I'm preparing to submit a .Net 1.1 application for a Platform test that
    uses a web service. The first time the app creates the proxy object
    AppVerifier reports an invalid handle exception. In WinDbg the error
    appears to be within the .Net framework code while it is loading the
    System.Web.Services.dll.

    I've reproduced this behavior with a simple C# test app that has nothing but
    a button that constructs the proxy object. The web service I'm referencing
    in the test app is the template ASP.Net web service with the sample
    "HelloWorld" function uncommented.

    Is there any fix or work around for this problem? Is VeriTest going to fail
    the app because of it?

    Kevin
     
    Kevin, Mar 22, 2006
    #1
    1. Advertising

  2. Are you using Windows XP AppVerifier?

    Can you paste the sample code?

    Pandurang
    --
    blog: www.thinkingMS.com/pandurang


    "Kevin" wrote:

    > Hello,
    >
    > I'm preparing to submit a .Net 1.1 application for a Platform test that
    > uses a web service. The first time the app creates the proxy object
    > AppVerifier reports an invalid handle exception. In WinDbg the error
    > appears to be within the .Net framework code while it is loading the
    > System.Web.Services.dll.
    >
    > I've reproduced this behavior with a simple C# test app that has nothing but
    > a button that constructs the proxy object. The web service I'm referencing
    > in the test app is the template ASP.Net web service with the sample
    > "HelloWorld" function uncommented.
    >
    > Is there any fix or work around for this problem? Is VeriTest going to fail
    > the app because of it?
    >
    > Kevin
    >
    >
    >
     
    Pandurang Nayak, Mar 22, 2006
    #2
    1. Advertising

  3. Kevin

    Kevin Guest

    Pandurang,

    I'm using AppVerifier 3.0.0026 which is the version currently available in
    the Microsoft Download Center. It is lists Windows XP and Windows Server
    2003 as supported platforms. I'm running my test on Windows XP SP2.

    As far as sample code goes I created a C# ASP.Net web service and a C#
    Windows Application in Visual Studio.Net 2003. In the web service's
    Service1.asmx file I uncommented the sample HelloWorld function so the
    service1.asmx looks like this:
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Web;
    using System.Web.Services;

    namespace WebService2
    {
    /// <summary>
    /// Summary description for Service1.
    /// </summary>
    public class Service1 : System.Web.Services.WebService
    {
    public Service1()
    {
    //CODEGEN: This call is required by the ASP.NET Web Services Designer
    InitializeComponent();
    }

    #region Component Designer generated code

    //Required by the Web Services Designer
    private IContainer components = null;

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
    }

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    if(disposing && components != null)
    {
    components.Dispose();
    }
    base.Dispose(disposing);
    }

    #endregion

    // WEB SERVICE EXAMPLE
    // The HelloWorld() example service returns the string Hello World
    // To build, uncomment the following lines then save and build the
    project
    // To test this web service, press F5

    [WebMethod]
    public string HelloWorld()
    {
    return "Hello World";
    }
    }
    }

    The Windows application I just added the web reference and added a button to
    the form named buttonTest with the following code:
    private void buttonTest_Click(object sender, System.EventArgs e)
    {
    Service1.Service1 test = new Service1.Service1();
    MessageBox.Show(test.HelloWorld());
    }

    Running the test app in WinDbg hits the invalid handle exception before the
    message box is displayed.

    I've tried this test in Visual Studio 2005 and it works there without any
    AppVerifier errors or warnings but moving the actual application will
    require significant effort so I don't want to jump to that solution yet.

    Kevin

    "Pandurang Nayak" <pandurangATthinkingmsDOT(nospam)com> wrote in message
    news:...
    > Are you using Windows XP AppVerifier?
    >
    > Can you paste the sample code?
    >
    > Pandurang
    > --
    > blog: www.thinkingMS.com/pandurang
    >
    >
    > "Kevin" wrote:
    >
    >> Hello,
    >>
    >> I'm preparing to submit a .Net 1.1 application for a Platform test that
    >> uses a web service. The first time the app creates the proxy object
    >> AppVerifier reports an invalid handle exception. In WinDbg the error
    >> appears to be within the .Net framework code while it is loading the
    >> System.Web.Services.dll.
    >>
    >> I've reproduced this behavior with a simple C# test app that has nothing
    >> but
    >> a button that constructs the proxy object. The web service I'm
    >> referencing
    >> in the test app is the template ASP.Net web service with the sample
    >> "HelloWorld" function uncommented.
    >>
    >> Is there any fix or work around for this problem? Is VeriTest going to
    >> fail
    >> the app because of it?
    >>
    >> Kevin
    >>
    >>
    >>
     
    Kevin, Mar 23, 2006
    #3
  4. Just a hunch - do you connect to the server via a proxy server? VS uses IE
    settings, but when you run it from an OS process - such as WinDbg, it is a
    different story.

    I have never used AppVerifier, but from the download page, I saw this -
    "Application Verifier is a runtime verification tool for unmanaged code that
    assists in quickly finding subtle programming errors that can be extremely
    difficult to identify with normal application testing. "

    It clearly says UNMANAGED - and hence should logically not be able to load
    ..NET Assemblies.

    Regards
    Pandurang


    --
    blog: www.thinkingMS.com/pandurang


    "Kevin" wrote:

    > Pandurang,
    >
    > I'm using AppVerifier 3.0.0026 which is the version currently available in
    > the Microsoft Download Center. It is lists Windows XP and Windows Server
    > 2003 as supported platforms. I'm running my test on Windows XP SP2.
    >
    > As far as sample code goes I created a C# ASP.Net web service and a C#
    > Windows Application in Visual Studio.Net 2003. In the web service's
    > Service1.asmx file I uncommented the sample HelloWorld function so the
    > service1.asmx looks like this:
    > using System;
    > using System.Collections;
    > using System.ComponentModel;
    > using System.Data;
    > using System.Diagnostics;
    > using System.Web;
    > using System.Web.Services;
    >
    > namespace WebService2
    > {
    > /// <summary>
    > /// Summary description for Service1.
    > /// </summary>
    > public class Service1 : System.Web.Services.WebService
    > {
    > public Service1()
    > {
    > //CODEGEN: This call is required by the ASP.NET Web Services Designer
    > InitializeComponent();
    > }
    >
    > #region Component Designer generated code
    >
    > //Required by the Web Services Designer
    > private IContainer components = null;
    >
    > /// <summary>
    > /// Required method for Designer support - do not modify
    > /// the contents of this method with the code editor.
    > /// </summary>
    > private void InitializeComponent()
    > {
    > }
    >
    > /// <summary>
    > /// Clean up any resources being used.
    > /// </summary>
    > protected override void Dispose( bool disposing )
    > {
    > if(disposing && components != null)
    > {
    > components.Dispose();
    > }
    > base.Dispose(disposing);
    > }
    >
    > #endregion
    >
    > // WEB SERVICE EXAMPLE
    > // The HelloWorld() example service returns the string Hello World
    > // To build, uncomment the following lines then save and build the
    > project
    > // To test this web service, press F5
    >
    > [WebMethod]
    > public string HelloWorld()
    > {
    > return "Hello World";
    > }
    > }
    > }
    >
    > The Windows application I just added the web reference and added a button to
    > the form named buttonTest with the following code:
    > private void buttonTest_Click(object sender, System.EventArgs e)
    > {
    > Service1.Service1 test = new Service1.Service1();
    > MessageBox.Show(test.HelloWorld());
    > }
    >
    > Running the test app in WinDbg hits the invalid handle exception before the
    > message box is displayed.
    >
    > I've tried this test in Visual Studio 2005 and it works there without any
    > AppVerifier errors or warnings but moving the actual application will
    > require significant effort so I don't want to jump to that solution yet.
    >
    > Kevin
    >
    > "Pandurang Nayak" <pandurangATthinkingmsDOT(nospam)com> wrote in message
    > news:...
    > > Are you using Windows XP AppVerifier?
    > >
    > > Can you paste the sample code?
    > >
    > > Pandurang
    > > --
    > > blog: www.thinkingMS.com/pandurang
    > >
    > >
    > > "Kevin" wrote:
    > >
    > >> Hello,
    > >>
    > >> I'm preparing to submit a .Net 1.1 application for a Platform test that
    > >> uses a web service. The first time the app creates the proxy object
    > >> AppVerifier reports an invalid handle exception. In WinDbg the error
    > >> appears to be within the .Net framework code while it is loading the
    > >> System.Web.Services.dll.
    > >>
    > >> I've reproduced this behavior with a simple C# test app that has nothing
    > >> but
    > >> a button that constructs the proxy object. The web service I'm
    > >> referencing
    > >> in the test app is the template ASP.Net web service with the sample
    > >> "HelloWorld" function uncommented.
    > >>
    > >> Is there any fix or work around for this problem? Is VeriTest going to
    > >> fail
    > >> the app because of it?
    > >>
    > >> Kevin
    > >>
    > >>
    > >>

    >
    >
    >
     
    Pandurang Nayak, Mar 23, 2006
    #4
  5. Kevin

    Kevin Guest

    No proxy servers involved. I don't use one for IE normally and in this case
    everythings on the same box. The exception actually occurs before any
    connection to the web service is made.

    I'm going through the tests described in the March 2006 revision of the
    "Microsoft Platform Test for ISV Solutions Application Test Specification"
    (http://www.veritest.com/downloads/certification/platform_app_spec.pdf). In
    item 2 of the fundamental requirements, "Use Windows resources
    appropriately", it says VeriTest uses AppVerifier for the test. AppVerifier
    runs with any executable, but in this case its catching issues within the
    ..Net runtime environment as well as within the managed code. It did flag
    several issues I was able to fix.

    Since this is now the only resource issue I'm finding I'll try checking with
    someone at VeriTest to see if its a known issue there.

    Thanks for looking into it,
    Kevin.

    "Pandurang Nayak" <pandurangATthinkingmsDOT(nospam)com> wrote in message
    news:...
    > Just a hunch - do you connect to the server via a proxy server? VS uses IE
    > settings, but when you run it from an OS process - such as WinDbg, it is a
    > different story.
    >
    > I have never used AppVerifier, but from the download page, I saw this -
    > "Application Verifier is a runtime verification tool for unmanaged code
    > that
    > assists in quickly finding subtle programming errors that can be extremely
    > difficult to identify with normal application testing. "
    >
    > It clearly says UNMANAGED - and hence should logically not be able to load
    > .NET Assemblies.
    >
    > Regards
    > Pandurang
    >
    >
    > --
    > blog: www.thinkingMS.com/pandurang
     
    Kevin, Mar 23, 2006
    #5
  6. All the best and tell us if you found a fix.

    Regards
    Pandurang
    --
    blog: www.thinkingMS.com/pandurang


    "Kevin" wrote:

    > No proxy servers involved. I don't use one for IE normally and in this case
    > everythings on the same box. The exception actually occurs before any
    > connection to the web service is made.
    >
    > I'm going through the tests described in the March 2006 revision of the
    > "Microsoft Platform Test for ISV Solutions Application Test Specification"
    > (http://www.veritest.com/downloads/certification/platform_app_spec.pdf). In
    > item 2 of the fundamental requirements, "Use Windows resources
    > appropriately", it says VeriTest uses AppVerifier for the test. AppVerifier
    > runs with any executable, but in this case its catching issues within the
    > ..Net runtime environment as well as within the managed code. It did flag
    > several issues I was able to fix.
    >
    > Since this is now the only resource issue I'm finding I'll try checking with
    > someone at VeriTest to see if its a known issue there.
    >
    > Thanks for looking into it,
    > Kevin.
    >
    > "Pandurang Nayak" <pandurangATthinkingmsDOT(nospam)com> wrote in message
    > news:...
    > > Just a hunch - do you connect to the server via a proxy server? VS uses IE
    > > settings, but when you run it from an OS process - such as WinDbg, it is a
    > > different story.
    > >
    > > I have never used AppVerifier, but from the download page, I saw this -
    > > "Application Verifier is a runtime verification tool for unmanaged code
    > > that
    > > assists in quickly finding subtle programming errors that can be extremely
    > > difficult to identify with normal application testing. "
    > >
    > > It clearly says UNMANAGED - and hence should logically not be able to load
    > > .NET Assemblies.
    > >
    > > Regards
    > > Pandurang
    > >
    > >
    > > --
    > > blog: www.thinkingMS.com/pandurang

    >
    >
    >
     
    Pandurang Nayak, Mar 23, 2006
    #6
  7. Kevin

    mroker Guest

    Hi Kevin!

    Have you found any solution?

    Maybe you know already how VeriTest treats this error?

    I cannot go over the same problem :(

    Greetings!
     
    mroker, Apr 12, 2006
    #7
  8. Kevin

    mroker Guest

    Hi Kevin!

    Have you found any solution?

    Maybe you know already how VeriTest treats this error?

    I cannot go over the same problem :(

    Greetings!
     
    mroker, Apr 12, 2006
    #8
  9. Kevin

    mr Guest

    Hi Kevin!

    Have you found any solution?

    Maybe you know already how VeriTest treats this error?

    I cannot go over the same problem :(

    Greetings!
     
    mr, Apr 12, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roger Leigh
    Replies:
    8
    Views:
    458
    Karl Heinz Buchegger
    Nov 17, 2003
  2. Replies:
    3
    Views:
    470
    Victor Bazarov
    Nov 10, 2004
  3. DanielEKFA
    Replies:
    8
    Views:
    626
    DanielEKFA
    May 16, 2005
  4. Replies:
    8
    Views:
    733
    Bruno Desthuilliers
    Dec 12, 2006
  5. Lars Willich
    Replies:
    13
    Views:
    859
    Ian Shef
    Oct 23, 2007
Loading...

Share This Page