views:

1017

answers:

1

Hi, I have a problem with a my Web service and i need help. I have a Silverlight project and the ASP part Silverlight.Web. In Silverlight.Web a added a Linq to SQL file, a database userd to validate user login, and a created a service, a asmx file. In Silverlight project a added a Service Reference for my asmx Web Service. After build the ServiceReferences.ClientConfig was created. Whwn i run my project the service is not working with the created ServiceReferences.ClientConfig file:

If i comment this part will work only if run my project from VisualStudio,but if publish my project on IIS, the service is not working.(i change in ServiceReferences.ClientConfig my service path http://localhost/silverlight/UserLogin.asmx, where my service is published) I get this error:

Error: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SilverlightPowerPoint.UserLoginService.UsersLoginCompletedEventArgs.get_Result() at SilverlightPowerPoint.Login.uls_UsersLoginCompleted(Object sender, UsersLoginCompletedEventArgs e) at SilverlightPowerPoint.UserLoginService.UserLoginSoapClient.OnUsersLoginCompleted(Object state) Source file: http://localhost/Silverlight/SilverlightPowerPointTestPage.aspx

If i run the service from my IIS http://localhost/Silverlight/UserLogin.asmx, i give the parameters and it works, it return me the answer.

What can i do?

Thanck you, Andrei

+1  A: 

ServiceReferences.ClientConfig file:

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="UserLoginSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
                <security>
                    <transport>
                        <extendedProtectionPolicy policyEnforcement="Never" />
                    </transport>
                </security>
            </binding>
         </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://localhost:50470/UserLogin.asmx"
            binding="basicHttpBinding" bindingConfiguration="UserLoginSoap"
            contract="UserLoginService.UserLoginSoap" name="UserLoginSoap" />
    </client>
</system.serviceModel>

It works after i comment this:

             <security>
                <transport>
                    <extendedProtectionPolicy policyEnforcement="Never" />
                </transport>
            </security>
Andrei Bularca
so is this the answer u got ? os still have problem?
Meetu Choudhary
that's a common windows 7 problem, this answer works.
James Cadd