I am using a cache manifest to make a web application accessible offline. It all works fine until I add the functionality which connects to the SQL Server database (using a connection string stored in code behind not in web.config). The page is a simple empty testing page with no images or other resources. Somehow it is the database connection that is stopping it from working - it used to work before (even with database connectivity) and then just stopped...
CODE (page_load only...nothing else in page) page called 'tryit2.aspx'
protected void Page_Load(object sender, EventArgs e)
{
//open connections
oConn = new SqlConnection();
oConn.ConnectionString = _connectionString;
oConn.Open();
////----FETCH SUBCAT PRODS FROM DB
_currentDT = new DataTable();
SqlDataReader sqlDR2 = this.executeSQLcommand_returnDataReader(oConn, loadMenu, true, null);
_currentDT = new DataTable();
_currentDT.Load(sqlDR2);
sqlDR2.Dispose();
//dynamically create the cache manifest file
string appPath = Request.PhysicalApplicationPath;
string filePath = appPath + "cache.manifest";
StreamWriter w;
w = File.CreateText(filePath);
w.WriteLine("CACHE MANIFEST");
w.WriteLine("CACHE:");
w.WriteLine("tryit2.aspx");
w.WriteLine("NETWORK:");
w.WriteLine("*");
//closing the streamwriter
w.Flush();
w.Close();
}
Any idea why that might be please?