Click here to Skip to main content
14,976,527 members

Comments by Divya B Nair (Top 10 by date)

Divya B Nair 18-Mar-21 13:05pm View
   
The file format is correct. I have loaded it in online JSON Editor. I just pasted only the portion where I am facing issue while trying to parse using the below code. Hence please ignore if you see a mismatch in braces.
JObject studentObj = JObject.Parse(jsonString);
var res = JsonConvert.DeserializeObject<general>(jsonString);

This is the error I am getting. It's because ItemList[2].Item contains an array whereas in my C# class of ItemList, I have maintained the property as

[JsonProperty("Item")]
public Item ItemsList
{
get;
set;
}

'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'JsonGridViewer.Model.Item' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<t> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'Archive.ItemList[2].Item', line 1, position 2507.'
Divya B Nair 4-Jul-19 6:52am View
   
There are certain limitations in calling a .Net library from NSIS. My intuition points to that. I am definitely sure that its not related to C# code as sideways I had implemented it as a Console application and found it working.
Divya B Nair 14-Mar-19 0:35am View
   
I want to check the validity of signature against my exe in C#.Net.
Divya B Nair 5-Feb-18 10:22am View
   
In order to check this, I have to login to Windows and come to desktop. How can I identify which of these services (those in Running status) started after I logged in to my machine. I want to run my console app after I start my computer but before log in using my windows credentials.
Divya B Nair 5-Feb-18 9:39am View
   
It seems the console application is not launching without log in to the desktop. I pointed the errorDirPath to C:\Windows\Logs. But still the text file is not generated containing the text "Running application". Below is the code snippet.

static void Main(string[] args)
{
var errorDirPath = ConfigurationManager.AppSettings["ErrorLogPath"];
try
{
if (!Directory.Exists(errorDirPath))
Directory.CreateDirectory(errorDirPath);
errorLogPath = errorDirPath + "\\" + "_Log.txt";
File.AppendAllText(errorLogPath, "Running appplication");

Console.ReadLine();
}
catch (Exception ex)
{
File.AppendAllText(errorLogPath, "Failed to load application" + ex.Message.ToString());
}
}

The app is configured to run under System account in Task Scheduler. Also I am running exe that is present in my local drive.
Divya B Nair 5-Feb-18 5:22am View
   
Does the service run even without log in to the desktop. ? I mean at start up itself.
Divya B Nair 5-Feb-18 5:21am View
   
Deleted
It seems the console application is not launching without log in to the desktop. I pointed the errorDirPath to C:\Windows\Logs. But still the text file is not generated containing the text "Running application". Below is the code snippet.

static void Main(string[] args)
{
var errorDirPath = ConfigurationManager.AppSettings["ErrorLogPath"];
try
{
if (!Directory.Exists(errorDirPath))
Directory.CreateDirectory(errorDirPath);
errorLogPath = errorDirPath + "\\" + "_Log.txt";
File.AppendAllText(errorLogPath, "Running appplication");

Console.ReadLine();
}
catch (Exception ex)
{
File.AppendAllText(errorLogPath, "Failed to load application" + ex.Message.ToString());
}
}

The app is configured to run under System account in Task Scheduler. Also I am running exe that is present in my local drive.
Divya B Nair 23-Jan-18 15:55pm View
   
I am used to working with database but we don't prefer to use db just to store this information. That would be our last option :)
Divya B Nair 23-Jan-18 15:53pm View
   
In this case, we can configure the task in the scheduler to start only once which then internally calls timer with 5 mints each. Right?
Divya B Nair 26-Oct-14 23:07pm View
   
By manual changes I mean, I have added a particular node to my xml file. XMLDataProvider has a property called Source which indicates the path of an xml file. So If I make any change in the xml file provided in that path, do i need to recompile my visual studio solution to get the changes in effect.

What I noticed is when I recompile VS and run my application, the newly added node is listed in the tree view. However, running the application right after updating the xml file doesn't reflect the changes in my application. I hope everything is clear now.