views:

191

answers:

0

Hi.

I have a web solution that looks something like the below - a web project, a web service, and a service library.

Web Solution1
- Web Project
-- test.aspx
- WebAPILibrary
-- trade.cs
-- TradeService.cs
-- ITradeService.cs
- WebAPIService
-- trade.svc

Now, I am trying to retreive a JSON string produced by a trade.svc method using javascript. Something to the effect of:

...

xmlHttp.onreadystatechange = function()
{

        if (xmlHttp.readyState == 4)
        {
            var mdiv = document.getElementById("msg");
            mdiv.innerHTML = (xmlHttp.responseText);
        }
}

    var url = "http://localhost:4253/trade.svc/";
    url = url + "GetSomething?id=0&format=";
    xmlHttp.open("GET", url, true);
    xmlHttp.send('');

etc...

The problem is, when I fire this method, I get the error:

"Access to restricted URI denied"

I have noticed my Web Project is under localhost:3721 and my Web Service is under localhost:4253/ so, I gather that when I go outside of my project's context, I get this error.

I have tried fixing the problem by issuing httpcfg.exe on localhost:4253 but that didn't work.

Any ideas? Thanks.