GridView is not being displayed on ASP.NET page after it has been uploaded to IIS 8.0 server

GridView is not being displayed on ASP.NET page after it has been uploaded to IIS 8.0 server

I have written a script (aspx+aspx.cs pages) that connects to a .xls file and reads from several ranges of Excel cells, consecutively, and displays their content in multiple, consecutive, GridViews, one for each range of cells. The problem is that the code works fine when debugging it on my Visual Studio Community Edition 2013, but when I upload it to the Production Server, which is meant to be a IIS Server 8.0, none of the Gridviews shows up.

I have got some labels on the .aspx page, these are being displayed, but the GridView does not.

I have impersonated the application in web.config with a user that should have access to the resources on the server that hosts the IIS.

If I connect to the server with that user (same I used to impersonate the app) and use the same path to address the Excel file, then I can open/view the Excel file. I tried multiple versions to write down the path, none seems to work. Even C:\Name_of_the_Excel_File.xls (after saving the Excel file in the root of C:) is not working.

Seems that the aspx app can not read from the Excel file in any of the cases when hosted on IIS. e.g.:

<connectionStrings> <add name="xls" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\srv***\l***\9*****\9***\****M.xls;Extended Properties=Excel 8.0"/> </connectionStrings> 

Do you have any recommendation about what else could be causing this behaviour (why GridView does not show up when uploading the app on the IIS Server)?

by peppe2 via /r/csharp

Leave a Reply