?
Solved

How to make a Web Service visible only in my domain

Posted on 2008-10-14
6
Medium Priority
?
661 Views
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

Regards,

Daniel Peralta
0
Comment
Question by:danielnp20
[X]
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
6 Comments
 
LVL 13

Expert Comment

by:TechTiger007
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

0
 
LVL 9

Accepted Solution

by:
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">
    <system.web>
      <authorization>
        <deny users="*" roles="*"/>
      </authorization>
    </system.web>
  </location>

Open in new window

0
 

Author Comment

by:danielnp20
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

Regards,


Daniel Peralta


// as3 code to find the ws
ws.connect("http://www.myDomain.com/ecards.asmx?WSDL");

Open in new window

0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 9

Expert Comment

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

Author Comment

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

0
 
LVL 9

Expert Comment

by:HeoQue
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  
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

800 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