Webeks.net - freelance programming
freelance programming - php, Joomla, Zend ...
Home :: Articles :: Programming :: Programming :: Testing .asmx Web Services in Visual Studio 2008

Testing .asmx Web Services in Visual Studio 2008

Written by Miha

For my PIS homework I've tried to create an asmx-style web service with Visual Studio 2008. Wizard created me a test method that looked like this:

[TestMethod()]
[HostType("ASP.NET")]
[UrlToTest("http://localhost:8888/Hello/Hello.asmx")]
public void SayHelloToTest()
{
// Creation of the private accessor failed for
// Microsoft.VisualStudio.TestTools.TypesAndSymbols.Assembly
Assert.Inconclusive("Creation of the private accessor for " +
"Microsoft.VisualStudio.TestTools.TypesAndSy" +
"mbols.Assembly failed");
}

This looked fine and I alter test code for my needs. But when I've tried to run it, I've got 403 Forbidden error. I spent some time trying to rectify this, but didn't get anywhere.

Then I've found simple solution - just remove upper few lines and it will work as expected.

[TestMethod()]
public void SayHelloToTest()
{
//some test code of my own
}

blog comments powered by Disqus