Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


How to make a Web Service visible only in my domain

Posted on 2008-10-14
Medium Priority
Last Modified: 2013-11-19
Hi all,

I have a Web Service developed in c# and i uploaded to my server and i also can make the requests propertly.

The problem is that the WS is visible to anyone and i wanted to make it private, so that only the pages under my domain can see it and use it.

I hope u can help me with this

Thx a lot


Daniel Peralta
Question by:danielnp20
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 13

Expert Comment

ID: 22715306
One thing that you can do is create a seperate web site in IIS and publish your web service in this site. This site will not be having an external URL. Now you can access this web service by using http://localhost:portnumber/webservice.asmx


Accepted Solution

HeoQue earned 1500 total points
ID: 22715978
yes, i think you can by setting the following in web.config, this will deny requests to service url :
<location path="yourwebservice.asmx">
        <deny users="*" roles="*"/>

Open in new window


Author Comment

ID: 22725336
thx both for the reply,

TechTiger007 i cant do this because I only have rights to add, delete and modify files (including the web.config), but the server is in other country and i access with dreamweaver

HeoQue: I add the lines to the web.config file and now i cant access it.


I had a .swf in the root and it is looking for the service (i attach the as3 code), when it was public it works great, but after adding the lines to the web.config file it says (local):

Error opening URL 'http://test.universalmusica.com/ecards.asmx?WSDL'
Error #2044: ioError no controlado: text=Error #2032: Error de secuencia. URL: http://test.universalmusica.com/ecards.asmx?WSDL

So i upload the swf to the site and wheen i trid to access a methos I got the error:

Error #2044: ioError no controlado: text=Error #2032: Error de secuencia. URL: http://test.universalmusica.com/ecards.asmx?WSDL
      at alducente.services::WSDL/getWSDL()
      at alducente.services::WebService/connect()
      at arecard_fla::Ecard_9/sendData()

I hope you can help me ...thx 4 all


Daniel Peralta

// as3 code to find the ws

Open in new window

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 22725504
aha, for sure using from as3 is the same issue, let me see and i will get back to you.

Author Comment

ID: 22725538
but if i delete the lines of the web.config (the ones u posted) the service became public and it works.


Expert Comment

ID: 22725570
yes, the trick i proposed when you are consuming the code from an aspx page code-behind, (ASPNET user bypasses web.config authorization) but flash doesn't  

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question