Last post Jun 07, 2017 03:38 PM by ryanbesko
Jun 07, 2017 03:27 PM|gunderj|LINK
After creating my web app "SalesMon" in IIS under the default web site with DefaultAppPool and physical path of C\SalesMon I do a web deploy publish successfully from VS 2013. The project has index.html and several MVC5 pages which work great in VS testing.
I did have to manually copy the project's js, css and images files because they were somehow not part of the publish.
At end of publish the index.html comes up fine but when I navigate to the first MVC page I get error...
The EXECUTE permission was denied on the object 'get_sales_tree', database 'SalesMonitor', schema 'dbo'.
Here are my publish settings:
site name: Default Web Site/SalesMon
destination URL: http://localhost/SalesMon/index.html
SalesMonConnction: left null (as I expect to use the connection from web.config)
I get the feeling that the publish missed some MVC stuff because index.html css and js work fine. My Controller, Model and View names and code are all fine and work great when testing in VS.
Why does the click to a MVC page get this error and if you can advise how to fix, thanks.
Jun 07, 2017 03:38 PM|ryanbesko|LINK
When not running in VS the database is accessed using the user credentials the Application Pool in IIS is using. Make sure that user has access to the database or change the IIS Application Pool to use an account that does have access.