MVC4 , error never seen before

I get the weirdest error. I have included a screen shoot. Have someone experienced something similar? All my code logic look correct, not sure what will cause this in MVC.

Error when I compile in a browser
yguyon28Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yguyon28Author Commented:
This was when I was using Chrome. When I run the app in IE it is prompting me to download my controller? Doesn't make any sense....
0
zephyr_hex (Megan)DeveloperCommented:
Can you please post the GET method in your controller for this view?
0
yguyon28Author Commented:
Here is my code for my get method.

The problem is try to populate a drop down list. I get the error as soon as I try to populate the viewBag.libraryId

ViewBag.libraryId = ReturnLibraryFolderSelectList(libraryFolderRepository.ReturnList(ClientId), package.libraryFolderId);

Here is my Base Controler that the ReturnLibraryFolderSelectList is from:

  public SelectList ReturnLibraryFolderSelectList(IList<LibraryFolder> libraryfolder, int libraryFolderId)
        {
            LibraryFolder gbl = new LibraryFolder() { description = "Select a Folder", id = NEW_INT, inactive = false };
            libraryfolder.Insert(0, gbl);
            return new SelectList(libraryfolder, "id", "description", libraryFolderId);

        }

  public class LibraryFolder : BaseModel, ILibraryFolderRepository
    {

        public int id { get; set; }

        //the value of the description for the dropDown

        [Display(Name = "description")]
        [Required(ErrorMessage = "description is required")]
        public string description { get; set; }
       
        [Display(Name = "Client")]
        [ForeignKey("client")]
        public int clientId { get; set; }
        public virtual Client client { get; set; }

        /// <summary>
        /// whether the language is inactive
        /// </summary>
        [Display(Name = "Inactive")]
        [Required(ErrorMessage = "Inactive is required")]
        public bool inactive { get; set; }


        public IList<LibraryFolder> ReturnList(int clientId)
        {
            return db.LibraryFolders.Where(l => l.clientId == clientId && l.inactive == false).ToList();
        }
0
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

zephyr_hex (Megan)DeveloperCommented:
At what point in the ReturnLibraryFolderSelectList method does the error occur?  You should be able to drop a breakpoint in the method and step through the code.  Are the input / output values what you expect?
0
yguyon28Author Commented:
The reason of this error was because no database connection could be made... That is how null are being interpreted.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yguyon28Author Commented:
Because I was able to figure the problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.