locked
asp.net MVC api application won't run RRS feed

  • Question

  •              

    I am moving an asp.net web forms application over to mvc. I want to re-use as much code as possible so I decided use my existing linq to sql library.

    I am new to MVC, but have viewed numerous videos from PluralSite for direction.
    I created a model library to work between the linq to sql and the web api.  I had read that I needed to do this because of linq to sql's complexities.

    I have also created a web api and started adding linq queries to the controllers.

      public IList<Model.vSchedulesFill> GetCustomerSchedules(int id)
            {
                var sch = from p in _context.vSchedulesFills
                          where p.CustomerID == id
                          orderby p.SchedStartDateTime descending
                          select new Model.vSchedulesFill(p);



                return sch.ToList();
        }

    I tested the above query using Fiddler and the result were good, so I tried to run the program and received the HTTP Error 403.14 - Forbidden error.

    The database is on a remote server, but I am running the app in debug mode on my machine.

    The error mentions no default document or IIS directory browser not turned on.

    I looked up the default document and saw a lot about adding the web api help file.  So I went to NuGet and installed it, but the application still will not run.

    I have looked all over for solution to this problem...

    What am I doing wrong and what do I need to do to fix this?  So far I've wasted two days trying to figure this out.

    Thanks for your help

    Friday, March 8, 2013 4:13 PM

Answers

  • Hi,

    Sorry, I never had such a problem so I cannot give a solution.

    But I would suggest to check out http://forums.asp.net because there are the ASP.Net related forums.

    With kind regards,

    Konrad

    • Proposed as answer by Just Karl Wednesday, January 15, 2014 4:15 PM
    • Marked as answer by Just Karl Thursday, January 23, 2014 10:59 PM
    Saturday, March 9, 2013 5:50 AM

All replies

  • Hi,

    Sorry, I never had such a problem so I cannot give a solution.

    But I would suggest to check out http://forums.asp.net because there are the ASP.Net related forums.

    With kind regards,

    Konrad

    • Proposed as answer by Just Karl Wednesday, January 15, 2014 4:15 PM
    • Marked as answer by Just Karl Thursday, January 23, 2014 10:59 PM
    Saturday, March 9, 2013 5:50 AM
  • Hello,

    This should be asked in the Migrate from Other Web Technologies to ASP.NET forum, or the ASP.Net MVC forum on forums.asp.net.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    • Proposed as answer by Just Karl Wednesday, January 22, 2014 10:49 PM
    Wednesday, January 15, 2014 4:17 PM