when i write log to windows eventlog:
System.Diagnostics.EventLog.WriteEntry("SourceName", a_long_string);
i got the following exception:
Log entry string is too long. A string written to the event log cannot exceed 32766 characters.
then i splits my log message into 2 or more string. but i don't think it is a good idea.
any workarounds? (such as extern the limit per log entry)
The Event Log isn't intended for storing Chapter 1 of War and Peace. You really should reconsider what you're writing to the event log.
If you want to log something voluminous (e.g. a crash dump), you can always store it somewhere on disk and write a message to the EventLog something like Generated dump at C:\Users\MyUserName\AppData\Local\MyApp\WarAndPeace.pdf.
Related
We are receiving the sc-win32-Status code as -2147023901 in case of Failed Requests. We didnt get much info when we googled on net.
Please throw some light as to whether the issue is related to any Network issue.
I would guess that error is really 995:
ERROR_OPERATION_ABORTED
The I/O operation has been aborted because of either a thread exit or an application request.
Some libraries combine normal Windows error codes with some flags in the upper 16 bits of a DWORD value, which can hide the original number. If I see a negative number error code around -2100000000, I do this:
Convert to hex (with calc.exe or whatever) In this case decimal -2147023901 is hex 0x800703E3.
Take the lower 16 bits (0x00003E3)
Try to look that up. For instance, on MSDN.
Another handy trick that often works is to see if it can be decoded by certutil -error. From a command line:
C:\>certutil -error -2147023901
0x800703e3 (WIN32: 995) -- 2147943395 (-2147023901)
Error message text: The I/O operation has been aborted because of either a thread exit or an application request.
CertUtil: -error command completed successfully.
We have a new beta version of our software with some changes, but not around our database layer.
We've just started getting Error 3128 reported in our server logs. It seems that once it happens, it happens for as long as the app is open. The part of the code where it is most apparent is where we log data every second via SQLite. We've generated 47k errors on our server this month alone.
3128 Disk I/O error occurred. Indicates that an operation could not be completed because of a disk I/O error. This can happen if the runtime is attempting to delete a temporary file and another program (such as a virus protection application) is holding a lock on the file. This can also happen if the runtime is attempting to write data to a file and the data can't be written.
I don't know what could be causing this error. Maybe an anti-virus program? Maybe our app is getting confused and writing data on top of each other? We're using async connections.
It's causing lots of issues and we're at a loss. It has happened in our older version, but maybe 100 times in a month rather than 47,000 times. Either way I'd like to make it happen "0" times.
Possible solution: Exception Message: Some kind of disk I/O error occurred
Summary: There is probably not a problem with the database but a problem creating (or deleting) the temporary file once the database is opened. AIR may have permissions to the database, but not to create or delete files in the directory.
One answer that has worked for me is to use the PRAGMA statement to set the journal_mode value to something other than DELETE. You do this by issuing a PRAGMA statement in the same way you would issue a query statement.
PRAGMA journal_mode = OFF
Unfortunately, if the application crashes in the middle of a transaction when the OFF journaling mode is set, then the database file will very likely go corrupt.1.
1 http://www.sqlite.org/pragma.html#pragma_journal_mode
The solution was to make sure database delete, update, insert only happened one at at time by wrapping a little wrapper. On top of that, we had to watch for error 3128 and retry. I think this is because we have a trigger running that could lock the database after we inserted data.
I'll try provide as much information as possible:
No error message.
The instance stays in the "ready service instances".
The receive location has the same parameters (except URI, the three polling queries, user account/pw and receive pipeline) as another receive location that points to another database/table which works.
The pipeline is waiting for the correct schema.
The port surface and receive location are both waiting for the correct schema.
In my test example, there are only 10 lines being returned.
The message, which contains those 10 lines, validates against the schema.
I tried to let the instance alone to no avail - 30+ minutes - and no change in its condition.
I had also tried suspending and then resuming it which then places the instance in the "dehydrated orchestrations" list. Again, with no error message.
I'm able to get the message by looking at the body of the message that's in the "ready to run" service. (This is the message that validates versus the schema I use in Visual Studio.)
How might something like this arise?
Stupid question, but I have to ask... Is the corresponding host instance running?
I want to send a string from a website to a local machine.
My local machine is connected into a network through a router.
Thanks You
email Id: manish.m.meshram#gmail.com
Well, that largely depends on what the receiving computer needs to do with that string.
If you only need to notify the user of this, I would suggest the easier way is to go with the net send command.
Since you are wking in ASP.net, you can use the Process and ProcessStartInfo class to launch a command like
net send YourPC "String to send"
If you need to do something more sophisticated with the string message, you could for example print it in some sort of log file and then read it from the destination machine.
If you can give more information on your needs, we'll be probably able to help you better.
Luca
I suggest you poll the webapp for messages.
For instance, let the webapp have an URL that simply returns the timestamp of the most recent message, at http://thesite.com/messages/MostRecentTimetamp.aspx
The page should return the timestamp only, in an format you can parse, for instance:
2009-08-29 14:00:00
Then, on another URL, http://thesite.com/messages/FromLastHour.aspx display the list of messages for the last N hours (or other suitable time period). This page could return one message per line, with the message timestamp at the start of the line.
For instance:
2009-08-29 13:58:20 A message
2009-08-29 13:59:30 Here's a message
2009-08-29 14:00:00 Another message
On your local machine, create a program that as often as needed reads and parses http://thesite.com/messages/MostRecentTimetamp.aspx. If the program detects that the timestamp has changed, read http://thesite.com/messages/FromLastHour.aspx and process the new messages.
Adjust the timing according to your needs.
Or even better, have an URL: http://thesite.com/messages/MoreRecentThan.aspx?timestamp=2009-08-29 13:50:00.
That returns messages that are newer than the timestamp passed in. The program on your local machine should then pass the timestamp of the most recent message it has handled.
Of course, your web site has to keep track of outgoing messages in some sort of queue. You could use a database table for this. The web app can delete old messages from this table periodically.
If you want to get fancy, you could implement this as a SOAP web service. Or you could let the URLs return the data formatted as JSON.
I am having an VBScript files which runs by many instance of jobs. I need to log the error information if any error occurs in the script processing. If i maintain a log file then how can i differentiate the log file for each instances (around 10 simultaneous instances) of vb script calling.
I dont go for any db logging.
Please suggest some good ways.
I would use the same log file for all instances. I would then have each instance create a GUID:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb05/hey0221.mspx
When an error is logged by an instance, it uses the GUID to identify itself. This way it shouldn't matter if you have 10 or 50 instances, they will be unique in logging and you won't have a ton of log files everywhere.