Home

Testing .asmx Web Services in Visual Studio 2008

E-mail Print
Share/Save/Bookmark
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
}
Hits: 2053
Comments (0)Add Comment

Write comment

busy
Last Updated ( Thursday, 22 May 2008 21:37 )  

Sponsored Links

My friends

Bookingpoint
partner websites

Donate

Do you find content useful? Please donate so I can cover my hosting expenses! Thanks!