8 Replies Latest reply on Nov 6, 2009 3:15 PM by uniquehandle

    Security error accessing url when running flex app with .net web service

    uniquehandle Level 1

      I have followed the nice introduction to flex and .net web services found at http://www.codeproject.com/KB/aspnet/FlexASPWebService.aspx and get an error when I run the flex app. It looks like a cross domain security issue but I have not been able to solve it so far. I hope someone here will have seen this before and can advise a fix?

      I've created the db and the asp.net web service. I'm using vs2008 on winxp; I published to a dir at c:\inetpub\wwwroot\praveentest. I need to change the virtual dir property via the Create button so that IIS regarded this as an application. Now I can access the asmx directly via the browser; I get the data, the wsdl is there, it all looks good.


      The flex side has this entry for my app:

      <mx:WebService id="ws" wsdl="http://myworkstation/praveentest/Service.asmx?WSDL" fault="fault(event)">

      That's the url that works directly in the browser. But when I try to run the flex app I get this error:


      [FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://myworkstation/praveentest/Service.asmx?WSDL)"] messageId="197AE572-4E1E-8501-4F20-BC0F37B72FDB" type="fault" bubbles=false cancelable=true eventPhase=2]


      Any ideas re what I'm missing?