PranavSoral 0 Newbie Poster

Hi,

I am facing a strange problem. I have an application developed using C# and ASP.NET. The application is working on some machines but it is not working on others. The problem occurs while saving the data. On some machines the data is getting saved but on others it is not. It throws NullReference Exception. If we change the Privacy settings in Internet explorer from 'Medium' to 'Accept all cookies', it is working fine. But on some machines it is saving the details even if the Privacy settings are 'Medium'.

I am using three datagrids in the page which is throwing error. The exception occurs when we take the first grid's datasource and put it in a DataTable. The error occurs irrespective of whether we have data in the grid or not. The error occurs in the code which reads as follows:

DataView dView;
DataTable dTable;
dView = (DataView)(grid.DataSource);
dTable = dView.Table; // It throws exception in this line.

Is it a problem with user's machines or my code? I have checked the internet explorer settings of the machines which are having problems and changed them to match the settings of machines which do not have any problems in running the application. The one way I have found out is to change Privacy settings from 'Medium' to 'Accept all cookies' on the machines which are throwing the exception. But due to security issues users do not want it.

I need help urgently!

Pranav Soral