0
votes

Good day!

In our project we are using .NET RIA Services and Linq2Sql. To insert/update entity we've implemented some custom logic. On server side was written a method which call sp. The problem is that our method don't invoked because it can not be found!

Implemented method on server side:

public void InsertNewPolicy(Policy policy)
{
    int userId = 111;
    int? policyId = -1;
    policyId = this.Context.cast_Policy_Insert(ref policyId, null, policy.PolicyNumber, policy.PolicyEffectiveDate,
                                    policy.PolicyExpirationDate, policy.ModifiedUserId, policy.PrimaryInsuranceCompanyID,
                                    policy.IssuingInsuranceCompanyID, null, null, policy.PolicyTypeID, null,
                                    null, "", null, "", null, "", null, null, null, userId);
}

Class witch contains this method marked with EnableClientAccess attribute.

On client side we call this method as:

CASTDomainContext context = new CASTDomainContext();
context.Policies.Add(EditablePolicy);
context.SubmitChanges();

But when run this, operaton fails with 404 error code and says that resource with URL CASTSilverlight/ClientBin/DataService.axd/CASTSilverlight-Web-CASTDomainService/$Submit cannot be found!

Please, help to solve this problem.

Thanks.

1

1 Answers

0
votes

feugenix -- to rule out some of the general common errors with services (and the NotFound error), are you running the Silverlight application under an HTTP context? (i.e., the address bar in the app is NOT c:\something?)

I usually recommend using a tool to sniff the traffic and really see what the response is from the server. http://timheuer.com/blog/archive/2008/06/10/silverlight-services-cross-domain-404-not-found.aspx