WebService: Error adding reference or calling the service in browser

Hi Experts,

I've created the simple hello world webservice.
when I want to call it in the browser or when I want to add the reference to a aspx-site the following error occurs:

Server Error in '/' Application.

The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.

VisualStudio adding reference:
The proxy settings on this computer are not configured correctly for web discovery

But the webservice and the aspx site are on the same server. I'm still testing. It's my first webservice.

Thanks a lot for help!
Who is Participating?
Hello arthrex,
The error you have mentioned can be incurred
1. Each web service is called with its port number so if you want to reference a webservice you have to use http://localhost:8080/testapplication/service.asmx.
also make sure that your service is running on that port(if VS2005).
2. The other solution could be
go to IIS...
Navigate to your virtual directory .
right click your virtual directory ..
On the Directory tab Click on Remove button and then click on Create
and press OK  button for the changes to happen
now browse your asmx file from the IIS

I think the above solutions should work..


arthrexAuthor Commented:
Thanks a lot for your answer.
The Number 2 really helped me.
But in fact, tha main problem war the sharepoint server on which the service was running.
You have to delete the Webservice-extension out of a list of prohibited extensions in the sharepoint administration.

Thanks again!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.