Search Results

Search found 3 results on 1 pages for 'lambo jayapalan'.

Page 1/1 | 1 

  • How do I prevent IIS 8 from stopping idle ASP.NET applications?

    - by Lambo Jayapalan
    I have an asp.net application running on Windows 2012 in IIS 8 that has a very time consuming application start process (essentially the code running in the Application_Start() event can take up to 2 minutes). Thus I'd like to minimize the number of times the application is started so that the user can avoid a long wait. I've enabled Preload in the application settings, and I've set the Start Mode to AlwaysRunning in the application pool. Yet the application still ends after not being used for a while, resulting in a very long time for the first visit to the website after the application shuts down. Does anyone have any ideas on how I can prevent this? Thanks

    Read the article

  • Object reference not set to an instance of an object.

    - by Lambo
    I have the following code - private static void convert() { string csv = File.ReadAllText("test.csv"); string year = "2008"; XDocument doc = ConvertCsvToXML(csv, new[] { "," }); doc.Save("update.xml"); XmlTextReader reader = new XmlTextReader("update.xml"); XmlDocument testDoc = new XmlDocument(); testDoc.Load(@"update.xml"); XDocument turnip = XDocument.Load("update.xml"); webservice.singleSummary[] test = new webservice.singleSummary[1]; webservice.FinanceFeed CallWebService = new webservice.FinanceFeed(); foreach(XElement el in turnip.Descendants("row")) { test[0].account = el.Descendants("var").Where(x => (string)x.Attribute("name") == "account").SingleOrDefault().Attribute("value").Value; test[0].actual = System.Convert.ToInt32(el.Descendants("var").Where(x => (string)x.Attribute("name") == "actual").SingleOrDefault().Attribute("value").Value); test[0].commitment = System.Convert.ToInt32(el.Descendants("var").Where(x => (string)x.Attribute("name") == "commitment").SingleOrDefault().Attribute("value").Value); test[0].costCentre = el.Descendants("var").Where(x => (string)x.Attribute("name") == "costCentre").SingleOrDefault().Attribute("value").Value; test[0].internalCostCentre = el.Descendants("var").Where(x => (string)x.Attribute("name") == "internalCostCentre").SingleOrDefault().Attribute("value").Value; MessageBox.Show(test[0].account, "Account"); MessageBox.Show(System.Convert.ToString(test[0].actual), "Actual"); MessageBox.Show(System.Convert.ToString(test[0].commitment), "Commitment"); MessageBox.Show(test[0].costCentre, "Cost Centre"); MessageBox.Show(test[0].internalCostCentre, "Internal Cost Centre"); CallWebService.updateFeedStatus(test, year); } It is coming up with the error of - NullReferenceException was unhandled, saying that the object reference not set to an instance of an object. The error occurs on the first line test[0].account. How can I get past this?

    Read the article

  • Set class property at runtime.

    - by Lambo
    I have a problem with my code, I cannot get it the 'test' to get the values im trying to assign to it. rec = new Record(account, actual, commitment, costCentre, internalCostCentre); webservicename.singleSummary test = new webservicename.singleSummary(); test.account = rec.Account; test.actual = recc.Actual; test.commitment = rec.Commitment; test.costCentre = rec.CostCentre; test.internalCostCentre = rec.InternalCostCentre; webservicename.Feed CallWebService = new webservicename.Feed(); I am trying to get this to pop up in a dialog box to show that it is working, with something like test.account getting showed in the message box, not sure quite what the problem is. My overall problem is I am trying to set the class porpert at runtime. Any help is appreciated.

    Read the article

1