Sto usando MVC NET in un ambiente distribuito con CSLA e mi posso riferimento HttpPostedFileBase da uno dei miei strati web (ad esempio Website.MVC), ma non posso riferimento HttpPostedFileBase da un strato separato (chiamiamolo OtherLayer.Web).C# - Non posso riferire HttpPostedFileBase
Qualche idea su cosa devo fare per poter chiamare HttpPostedFileBase? Sono in grado di usare HttpPostedFile in entrambi i livelli - dovrei semplicemente usare questo?
I riferimenti di montaggio sono fondamentalmente la stessa - in Website.MVC ho:
namespace Website.Mvc.Controllers
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web;
using System.IO;
using PetOrganizer.Mvc.Helpers;
using TrupanionPetInsurance.Web;
Mentre nel mio altro strato ho:
namespace OtherLayer.Web
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Net.Mail;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using System.Xml;
using System.Xml.Serialization;
using Csla;
using iTextSharp.text;
using iTextSharp.text.pdf;
using TruDat.BusinessLayer;
using TruDat.BusinessLayer.Billing;
using TruDat.BusinessLayer.Data;
using TruDat.BusinessLayer.Utility;
using TrupanionPetInsurance.Web.EmailTemplateParser;
using TruDat.BusinessLayer.DataServices;
Per qualche motivo non posso riferire System.Web.Abstractions - ottengo l'errore: Errore Il nome di tipo o spazio 'Astrazioni' non esiste nello spazio dei nomi 'System.Web' (le manca un riferimento all'assemblaggio?) – Teddy
Ciao Teddy, la mia risposta al tuo commento era troppo lunga quindi ho aggiornato il mio post in alto invece :) –
Ok, il mio collaboratore ha capito questo - ho appena aggiunto il riferimento a System.Web.Abstractions in OtherLayer.Web. Ora posso fare riferimento a HttpPostedFileBase. Grazie per l'aiuto! – Teddy