I made in my controller method that should creat another product
[HttpPost]
public ActionResult Create(ProductType product)
{
if (ModelState.IsValid){
ServiceReference1.Service1Client proxy = new ServiceReference1.Service1Client();
proxy.AddProduct(product);
return RedirectToAction("Index");
}
And the AddProduct is In WCF service
public void AddProduct(ProductType product)
{
Product _product = new Product();
_product.Name = product.Name;
_product.AddDate = DateTime.Now;
_product.Price = product.Price;
_product.isActive = product.isActive;
_product.CategoryID = product.CategoryID;
BaseShopEntities productToAdd = new BaseShopEntities();
productToAdd.AddToProduct(_product);
}
But I have an error I saw some infos in net but can't find solution on my problem.
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
Service References\ServiceReference1\Reference.cs Line: 78
Line 76:
Line 77: public void AddProduct(Shop.Data.ProductType product) {
Line 78: base.Channel.AddProduct(product);
Line 79: }
Line 80: }
Any1 know solution for this ?