Code s'executant sur le poste local et pas chez l'hebergeur
Bonjour,
ce code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
public PartialViewResult CatProduct22(FormCollection data, ApplicationModel application, SessionModel session)
{
ShopsModel modele = new ShopsModel()
{
Application = application,
Session = session
};
TryUpdateModel(modele, data);
var pbd = modele.ID;
session.cityID = modele.ID;
session.cityID.ToString();
session.cityName = application.CityItems.Where(p => p.Value == modele.ID.ToString()).Select(pd => pd.Text).First();
var shoptype = application.Metier.getshopstype();
var shop = application.Metier.getshops();
var Rest = shoptype.Where(p => p.Intitulé.StartsWith("Restaur")).Select(pd => pd.Id).First();
session.RestaurantItems = shop.Where(p => (p.shoptype_ID == Rest && p.city_id == modele.ID)).Select(pd => new SelectListItem { Text = pd.name, Value = pd.Id.ToString() }).ToArray();
session.RestaurantItems.ToString();
var Sup = shoptype.Where(p => p.Intitulé.StartsWith("SuperM")).Select(pd => pd.Id).First();
session.SupermarchéItems = shop.Where(p => (p.shoptype_ID == Sup && p.city_id == modele.ID)).Select(pd => new SelectListItem { Text = pd.name, Value = pd.Id.ToString() }).ToArray();
session.SupermarchéItems.ToString();
var pizz = shoptype.Where(p => p.Intitulé.StartsWith("Pizz")).Select(pd => pd.Id).First();
session.PizzariatItems = shop.Where(p => (p.shoptype_ID == pizz && p.city_id == modele.ID)).Select(pb => new SelectListItem { Text = pb.name, Value = pb.Id.ToString() }).ToArray();
session.PizzariatItems.ToString();
var CF = shoptype.Where(p => p.Intitulé.StartsWith("Chambre")).Select(pd => pd.Id).First();
session.CFroidesItems = shop.Where(p => (p.shoptype_ID == CF && p.city_id == modele.ID)).Select(pb => new SelectListItem { Text = pb.name, Value = pb.Id.ToString() }).ToArray();
session.CFroidesItems.ToString();
var Pois = shoptype.Where(p => p.Intitulé.StartsWith("Poisson")).Select(pd => pd.Id).First();
session.PoissonnerieItems = shop.Where(p => (p.shoptype_ID == Pois && p.city_id == modele.ID)).Select(pb => new SelectListItem { Text = pb.name, Value = pb.Id.ToString() }).ToArray(); ;
session.PoissonnerieItems.ToString();
var Bouc = shoptype.Where(p => p.Intitulé.StartsWith("Bouche")).Select(pd => pd.Id).First();
session.BoucherieItems = shop.Where(p => (p.shoptype_ID == Bouc && p.city_id == modele.ID)).Select(pb => new SelectListItem { Text = pb.name, Value = pb.Id.ToString() }).ToArray();
session.BoucherieItems.ToString();
var Patis = shoptype.Where(p => p.Intitulé.StartsWith("Patisse")).Select(pd => pd.Id).First();
session.PatisserieItems = shop.Where(p => (p.shoptype_ID == Patis && p.city_id == modele.ID)).Select(pb => new SelectListItem { Text = pb.name, Value = pb.Id.ToString() }).ToArray();
session.PatisserieItems.ToString();
var March = shoptype.Where(p => p.Intitulé.StartsWith("March")).Select(pd => pd.Id).First();
session.MarchéVivresItems = shop.Where(p => (p.shoptype_ID == March && p.city_id == modele.ID)).Select(pb => new SelectListItem { Text = pb.name, Value = pb.Id.ToString() }).ToArray();
session.MarchéVivresItems.ToString();
session.ToString();
return PartialView(modele);
//return PartialView("CancelorFile");
} |
s'execute bien en local chez moi mais après publication de l'application il ne s'execute plus. y aurait il une incongruité dans le code ?
Il renvoit l'erreur 500 Internal server error. Mais l'hebergeur pense que l'erreur vient de mon code. Quelqu'un pourrait il l'inspecter pour moi svp ?
Merci d'avance
Prisson