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.