FLEX报错Security error accessing url

今天把做好的一个FLEX系统放在IIS下访问,点浏览的时候。

点击需要HTTPSERVICE的功能的时候,提示报错。

[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at DirectHTTPMessageResponder/securityErrorHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
在网上搜索,多次尝试,发现是访问的地址不对。

在IIS里点浏览,默认路径是http://localhost开始的。改成IP地址的话就正常了,没有以上错误。