wcf binding - WCF Error for some users -


i have silverlight app has wcf services uses. when run silverlight app, works fine. person can use fine, however, majority of users error.

"an error occurred while trying make request uri 'xxxxx'. due attempting access service in cross-domain way without proper cross-domain policy in place, or policy unsuitable soap services. may need contact owner of service publish cross-domain policy file , ensure allows soap-related http headers sent. error may caused using internal types in web service proxy without using internalsvisibletoattribute attribute. please see inner exception more details."

i enabled wcf tracing , noticed few errors there when these users accessed silverlight app:

1) configuration evaluation context not found. 2) content type application/soap+xml; charset=utf-8 sent service expecting text/xml; charset=utf-8

here config files:

server config wcf:

    <?xml version="1.0"?> <configuration>     <system.diagnostics>         <sources>             <source name="system.servicemodel"                     switchvalue="all"                     propagateactivity="true">                 <listeners>                     <add name="tracelistener"                         type="system.diagnostics.xmlwritertracelistener"                         initializedata= "c:\log\traces.svclog" />                 </listeners>             </source>         </sources>     </system.diagnostics>   <system.web>     <compilation debug="true" targetframework="4.0" />       <authentication mode="windows"/>       <identity impersonate="false"/>       <customerrors mode="off" />   </system.web>     <appsettings>      </appsettings>     <system.servicemodel>         <behaviors>             <servicebehaviors>                 <behavior>                     <!-- avoid disclosing metadata information, set value below false , remove metadata endpoint above before deployment -->                     <servicemetadata httpgetenabled="true"/>                     <!-- receive exception details in faults debugging purposes, set value below true.  set false before deployment avoid disclosing exception information -->                     <servicedebug includeexceptiondetailinfaults="true"/>                 </behavior>             </servicebehaviors>         </behaviors>         <servicehostingenvironment multiplesitebindingsenabled="true" />     </system.servicemodel>  <system.webserver>     <modules runallmanagedmodulesforallrequests="true"/>   </system.webserver>  </configuration> 

here client config in silverlight:

<configuration>     <system.servicemodel>         <bindings>             <basichttpbinding>                 <binding name="basichttpbinding_isltocrm" maxbuffersize="2147483647"                     maxreceivedmessagesize="2147483647">                     <security mode="none" />                 </binding>                 <binding name="basichttpbinding_isltosql" maxbuffersize="2147483647"                     maxreceivedmessagesize="2147483647">                     <security mode="none" />                 </binding>             </basichttpbinding>         </bindings>         <client>             <endpoint address="http://xxxx.svc" binding="basichttpbinding"                 bindingconfiguration="basichttpbinding_isltocrm" contract="slcrmsrvc.isltocrm"                 name="basichttpbinding_isltocrm" />             <endpoint address="http://yyyy.svc" binding="basichttpbinding"                 bindingconfiguration="basichttpbinding_isltosql" contract="slsqlsrvc.isltosql"                 name="basichttpbinding_isltosql" />         </client>     </system.servicemodel> </configuration> 

the wcf service hosted in iis 6.1 on windows server 2008 r2. application pool set run under specific user. managed pipeline mode classic , anonymous authentication enabled on site in iis. other authentication disabled.

any in figuring out? not sure why myself , use can access app fine users cannot. security issue or wrong how created wcf service?

updated server config wcf:

<?xml version="1.0"?> <configuration>     <system.diagnostics>         <sources>             <source name="system.servicemodel"                     switchvalue="all"                     propagateactivity="true">                 <listeners>                     <add name="tracelistener"                         type="system.diagnostics.xmlwritertracelistener"                         initializedata= "c:\log\traces.svclog" />                 </listeners>             </source>         </sources>     </system.diagnostics>   <system.web>     <compilation debug="true" targetframework="4.0" />       <customerrors mode="off" />        <authentication mode="windows" />    </system.web>     <appsettings>      </appsettings>     <system.servicemodel>                <bindings>             <basichttpbinding>                 <binding name="mybinding">                     <security mode="transportcredentialonly">                         <transport clientcredentialtype="windows" proxycredentialtype="none" realm="" />                     </security>                 </binding>             </basichttpbinding>         </bindings>         <services>             <service name="crmwcf.sltocrm" behaviorconfiguration="crmbehavior">                 <endpoint address="" binding="basichttpbinding" bindingconfiguration="mybinding" contract="crmwcf.isltocrm" />             </service>             <service name="crmwcf.sltosql" behaviorconfiguration="crmbehavior">                 <endpoint address="" binding="basichttpbinding" bindingconfiguration="mybinding" contract="crmwcf.isltosql" />             </service>         </services>         <behaviors>             <servicebehaviors>                 <behavior name="crmbehavior">                     <!-- avoid disclosing metadata information, set value below false , remove metadata endpoint above before deployment -->                     <servicemetadata httpgetenabled="true"/>                     <!-- receive exception details in faults debugging purposes, set value below true.  set false before deployment avoid disclosing exception information -->                     <servicedebug includeexceptiondetailinfaults="true"/>                 </behavior>             </servicebehaviors>         </behaviors>          <servicehostingenvironment multiplesitebindingsenabled="true" />     </system.servicemodel>  <system.webserver>      <httpprotocol>          <customheaders>              <add name="access-control-allow-origin" value="*"/>              <add name="access-control-allow-method" value="get,put,post,delete,options"/>              <add name="access-control-allow-headers" value="content-type"/>          </customheaders>      </httpprotocol>      <modules runallmanagedmodulesforallrequests="true"/>   </system.webserver>  </configuration> 

very common issue. need clientaccesspolicy.xml , crossdomain.xml.

http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -