I'm trying to create an MVC site that connects to a third-party Oracle DB for which I only have read access. This is my first time using MVC and Razor, so I created an ASPX page in the root folder to help with debugging and verifying my data.
Right now I'm just trying to display data from a query in one of my views. I used this example as a guide for connecting to the DB in the model. In my debug ASPX page, I created a GridView with the SqlDataSource set to the same connection string and query.
The GridView displays the data without any issue, but when I try to go to the View, I get the following error when it reaches the connection's Open command:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
What is different about the way the GridView's SqlDataSource is connecting to the DB, and how can I replicate that over in my model?