首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

出错:Security error accessing url解决办法

2012-03-01 
出错:Security error accessing url我用FLEX与WEBSERVICE编写一个登陆网站,在FLEX运行时正常,可是发布出来

出错:Security error accessing url
我用FLEX与WEBSERVICE编写一个登陆网站,在FLEX运行时正常,可是发布出来用IIS或者其他方式浏览时,FLEX就弹出个:Security error accessing url 错误。不知道怎么搞,还请各位帮帮忙。谢谢!
我的FLEX程序如下:
<!--
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" currentState="login" viewSourceURL="srcview/index.html">
<mx:states>
<mx:State name="index">
<mx:AddChild position="lastChild">
<mx:Label x="206" y="276" text="Welcome" width="284" height="130" fontSize="36" fontWeight="bold" fontStyle="italic" textDecoration="underline"/>
</mx:AddChild>
<mx:AddChild position="lastChild">
<mx:Button x="76" y="31" label="Exit" click="FExit();"/>
</mx:AddChild>
</mx:State>
<mx:State name="login">
<mx:AddChild position="lastChild">
<mx:Panel x="279" y="190" width="291" height="234" layout="absolute">
<mx:TextInput x="90" y="10" width="130" id="TIid"/>
<mx:TextInput x="90" y="54" width="130" id="TIpwd" text="{WS.Landing.lastResult}" valueCommit="Refresh()" displayAsPassword="true"/>
<mx:Label x="55" y="12" text="ID:" id="lid"/>
<mx:Label x="17" y="56" text="Password:" id="lpwd"/>
<mx:Button x="55" y="121" label="OK" click="landing();"/>
<mx:Button x="155" y="121" label="Cancel" click="repeal();"/>
</mx:Panel>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Script>
<![CDATA[
import mx.controls.Alert;

public function landing():void
{
var id:String = TIid.text;
var pwd:String = TIpwd.text;

WS.Landing(id,pwd).send();
}

public function Refresh():void
{
var n:Number = 0;

n = Number(TIpwd.text);
if (n == 10)
{
Alert.show("Landing succeed.");
currentState = "index"
//...
}
if (n == -1 )
{
repeal();
Alert.show("Error user ID.");
}
if (n == -2)
{
TIpwd.text = "";
Alert.show("Error password.");
}
}

public function FExit():void
{
currentState = "login";
repeal();
}

public function repeal():void
{
TIid.text = '';
TIpwd.text = '';
}

]]>
</mx:Script>
<mx:WebService id="WS" showBusyCursor="true"
wsdl="http://127.0.1.1/login/Service.asmx?WSDL"
fault="Alert.show(event.fault.faultString,'Error');return ;"
useProxy="false" >
<mx:operation name="Landing" resultFormat="object" />
</mx:WebService>

</mx:Application>
-->


[解决办法]
1、检查你的DTC服务(全名:Distributed Transaction Coordinator)是否可以正常启动, 如果正常的话请你跳过此步骤;如果出错,无法正常启动,请在开始菜单的运行中 运行:msdtc -resetlog 以创建日志文件。重起机器,检查IIS是否可以正常使用,若不行继续。 
 
2、在CMD下执行以下命令: 
cd %windir%\system32\inetsrv 

rundll32 wamreg.dll, CreateIISPackage 



regsvr32 asptxn.dll
[解决办法]
为什么是http://127.0.1.1 不是127.0.0.1 
还是笔误
[解决办法]
怎样检测服务器程序?
webService直接输入地址就可以啊

热点排行