Using SQL Server 2014, Visual Studio 2015 and IIS 8.0.9
Application works perfectly when launched in VS, but fails when deployed to IIS with the above error. The web page contains a drop down box and a start and end date textboxes. User selects hospital from drop down and enter start and end date criteria, clicks on a button and the results are returned in a gridview control. As I said, this functions perfectly in VS.
When I login to my IIS server, open IIS navigate to my application and select 'browse' from the options and try to navigate to this particular web page, the error is generated. All other functionality works as expected.
What I've tried:
- Have checked spelling of stored procedure and it's correct
- Have checked login credentials of database user in my connection string by logging in to SSMS using same credentials and executing stored procedure. Can do both both.
- Checked user permissions to stored procedure. User is a member of 'db_execute' role, which I think is OK
- Have checked that login credentials match those in IIS. They do as all other functionality is working and they all use the same login credentials
- Have run a SQL Profiler trace. It doesn't find any issues that I can see
- Have deleted and re-created the stored procedure a number of times. No change
- Have removed the application from IIS and recreated. No change
- Have installed on a server running a different version of IIS (6). I get the same error
I'm not sure but I think the the logon credentials to the database used in VS and those in IIS must be different. How do I find out what credentials IIS is using and how to do I configure the App on my IIS server so that the database accepts these credentials?
Of course, it could be something entirely different, but I'm shooting in the dark here. Can anyone help?