Hello I have an issue deploying my silverlight project to an existing website (normal website with aspx pages).
Everything works fine except that when silverlight tries to connect to the RIA service, it fails because the website is redirecting each time to the login page.
I found this on the web.config of the site that seems to make the trouble:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="AdWsSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://webserver/ADWS/AdWs.asmx" binding="basicHttpBinding"
bindingConfiguration="AdWsSoap" contract="AdWs.AdWsSoap" name="AdWsSoap" />
</client>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
As you can see, the site is using a custom binding, and I guess that the RIA service pass through it and thats why it redirects to the login page of the site. I can't modify this custom binding (because it will affect many other applications that runs with this configuration).
Is there a way to solve this problem maybe specifying the RIA service not to use this custom binding??
I tried to create the .SVC file by myself and to override the AddEndpoints this way:
protected override void AddEndpoints()
{
foreach (Uri uri in this.BaseAddresses)
{
AddRestWithJsonEndpoint(uri);
}
}
But it keeps passing through the custom binding. Please help.
Thanks in advance.