Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2006

Tip: Looking for answers? Try searching our database.

Web references and AppVerifier

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin - 22 Mar 2006 23:09 GMT
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 - 23 Mar 2006 00:01 GMT
Are you using Windows XP AppVerifier?

Can you paste the sample code?

Pandurang
Signature

blog: www.thinkingMS.com/pandurang

> Hello,
>
[quoted text clipped - 13 lines]
>
> Kevin
Kevin - 23 Mar 2006 01:26 GMT
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

> Are you using Windows XP AppVerifier?
>
[quoted text clipped - 22 lines]
>>
>> Kevin
Pandurang Nayak - 23 Mar 2006 01:37 GMT
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

Signature

blog: www.thinkingMS.com/pandurang

> Pandurang,
>
[quoted text clipped - 111 lines]
> >>
> >> Kevin
Kevin - 23 Mar 2006 02:13 GMT
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.

> 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
[quoted text clipped - 11 lines]
> Regards
> Pandurang
Pandurang Nayak - 23 Mar 2006 02:57 GMT
All the best and tell us if you found a fix.

Regards
Pandurang
Signature

blog: www.thinkingMS.com/pandurang

> 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
[quoted text clipped - 30 lines]
> > Regards
> > Pandurang
mroker - 12 Apr 2006 15:52 GMT
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 - 12 Apr 2006 15:54 GMT
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 - 12 Apr 2006 16:04 GMT
Hi Kevin!

Have you found any solution?

Maybe you know already how VeriTest treats this error?

I cannot go over the same problem :(

Greetings!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.