0

I have an odd problem with a .NET Web service. I have an old one that has been deployed for over 10 years. IT moved it to a new server and it quit working. I have tried to test it using localhost and am getting the message

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

As a test, I created a new Web service - just the default one with slight modifications to do Hello World but with my name - right from one of myriad examples. The first time I ran it, it gave me flack about certificates, and I installed one for localhost. It then continued and gave me the HTTP 403.14. I ran it again to demonstrate to a colleague, and it worked for some reason. I then copied the Web methods from my existing service into the example, and it worked as well. Great!

I then created another new Web service from scratch, but used the names that I had used in my original because we have applications that use that service, but left it as the initial Hello World to see if it worked. When I try to run it, I get the HTTP 403.14, and no matter what I do I cannot seem to get it to work. I changed the names in the project, tried the same project URL, no go.

Why would two example projects created from scratch behave differently?

GTAE86
  • 1,780
  • 3
  • 29
  • 39

1 Answers1

0

OK - I ran the test service again and it gave me the error. I did some more digging and came upon an answer to A default document is not configured for the requested URL, and directory browsing is not enabled on the server from user RBT: The fix was to fight-click the page in the project in solution explorer and select "Set As Start Page"

For my project, I did the same for my Web service asmx file and the problem went away: In Solution Explorer for my solution in Visual Studio, under my project, I right-clicked my asmx file and selected "Set As Start Page"

GTAE86
  • 1,780
  • 3
  • 29
  • 39