Hi there,
I'm trying to insert a new record into 'A160Pedimentos' table.
public void ProcesaDS()
{
var proxy = new IntermediaEntities(new Uri("http://myserver/MyDataService.svc/"));
var pedim = new A160Pedimentos
{
fechapago = DateTime.Now,
clavecliente = "0001",
firmapago = "FIRma"
};
proxy.AddToA160Pedimentos(pedim);
proxy.SaveChanges(); // Exception here
}
Problem is...
proxy.SaveChanges() throws the following exception:
System.NotSupportedException was unhandled
Message="The response to this POST request did not contain a 'location' header. That is not supported by this client."
Source="System.Data.Services.Client"
StackTrace:
at System.Data.Services.Client.DataServiceContext.SaveAsyncResult.HandleOperationResponse(HttpWebRequest httpWebRequest, HttpWebResponse response)
at System.Data.Services.Client.DataServiceContext.SaveAsyncResult.BeginNextChange(Boolean replaceOnUpdate)
at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options)
at System.Data.Services.Client.DataServiceContext.SaveChanges()
at Pedimentos160.Procesar.ProcesaDS() in C:\Pedimentos160\Procesar.cs:line 121
at Pedimentos160.Program.Main(String[] args) in C:\Pedimentos160\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Can someone please help?
Regards,
-Jorge