Alfresco DotCMIS CommunicationException on getContentStream() - alfresco

When trying to download a 4mb file using DotCMIS (WebServices binding), I receive the following exception when trying to get the content stream of the file.
The maximum message size quota for incoming messages (4194304) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
I tried modifying app/web configs to no avail. Is there any way around it?

After a few hours of playing with app.configs, downloading and studying sources and hopeless googling, the solution turned out to be, as always, painfully simple, obvious and not mentioned anywhere. Or maybe it's just that my googling skills are that of an underage imbecile with alzheimers. That lacks a brain. I'm not sure anymore.
As for the solution: SessionParameters static class / enum thingie has a wonderful field, called "MessageSize". Which defaults to 4194304. Setting it sets MaxReceivedMessageSize.

Related

Gamelift Matchmaking times out after match found

Hoping to get some insight into the behavior I am seeing while trying to use GameLift Matchmaking.
I have my configuration setup as such that it does not require player acceptance, as such:
GameLiftMatchmakingConfiguration:
Type: AWS::GameLift::MatchmakingConfiguration
Properties:
AcceptanceRequired: false
...
When I go to the GameLift console and into the configuration I see that it was correctly set as well that it does not require acceptance.
This is where I am confused, because now I have it working where it places 2 users in PotentialMatchCreated and I get this event from GameLift. Then 30 seconds later, I get more events stating that these placements timed out and searching again.
The configuration documentation states that AcceptanceTimeoutSeconds is only required if AcceptanceRequired is true, which it is not for me.
the acceptance documentation states that you only call this When FlexMatch builds a match, all the matchmaking tickets involved in the proposed match are placed into status REQUIRES_ACCEPTANCE
Which its not, its in PotentialMatchCreated.
So my question is, what do I have to do to confirm a placement once GameLift places 2 users into a match? I am a bit surprised because I thought that the fact that it doesn't have to be accepted would mean that its automatically accepted match.
Also theres very little documentation I found regarding what to do in this situation, given the nature of this service not being as known as others I totally expected that but really hoping someone can help me on what to do next.
Any insight or help is greatly appreciated.
UPDATE1:
Additional information: I do not need to utilize GameLift fleets or builds at all. We have a browser game we are building and just want to utilize the matchmaking feature. So we dont have any game servers or anything like that, its just on our website where they would play the game and use our api's/websockets that puts the matchmaking on the server and notify the client when a match has been found with all the subsequent details.
UPDATE2:
To confirm my suspicions I decided to actually try to use the accept match endpoint and see what happens. Just as the documentation states, you can only accept a match if it requires acceptance. I get an error stating that I cannot accept a match that is not in REQUIRE_ACCEPTANCE state. Guessing this is a bug on AWS's side, I don't see any other endpoints that I can hit for being in state PotentialMatchCreated.
Figured out the issue. It has to do with the FlexModeMatch on the GameLiftMatchmakingConfiguration. For my use case, just needing matchmaking, STANDALONE is the correct implementation because we aren't having GameLift actually create game servers/sessions for us. I had mine using WITH_QUEUE which is why I believe I was having issues. Seemingly working correctly now.

how to handle download request from a WebView using WebResourceRequestFilter blackberry Cascades

i want to handle any download request coming from Webview. how it is possible ? the documentation https://developer.blackberry.com/native/reference/cascades/bb__cascades__webresourcerequestfilter.html and https://developer.blackberry.com/native/reference/cascades/bb__cascades__webdownloadrequest.html are describing the parameters but couldn't figure out how to do it.
Your question is not clear on what you don't understand. Remember this is not a training forum, the idea is that you should try things, review the documentation and then ask specific questions to get the best out of a forum.
Moreover it is not clear whether you are trying to handle the download request at the Server, or capture the request before the download attempt leaves the BB.
I'm going to assume you want to display a web page on the BlackBerry but make sure that any resource requests that the page generates, are filtered by your program, so that you can supply the data (assuming you have it).
I implemented something like this a while ago and remember that it was not simple to figure out what was going on, but I played with it a bit and it all made sense.
I don't remember using WebDownloadRequest and can't really see how it helps in this case.
The key is WebResourceRequestFilter. You create your own WebResourceRequestFilter making sure you implement the required methods. Then you use WebPage::setNetworkResourceRequestFilter(WebResourceRequestFilter*) to make sure the webpage will ask your WebResourceRequestFilter for its resources. The first method the web page invokes is filterResourceRequest(), and the return from this invocation determines which other methods in your WebResourceRequestFilter, the Webage will invoke.
I suggest you implement a WebResourceRequestFilter, put some debugging in filterResourceRequest(), but always return FilterAction Accept, which means the web page will use its normal processing to obtain the resources. Then try various other FilterAction return values and see what happens...

HTTP Error 0 js/upload in drupal when attaching a file

I am trying to attach an 8M .wav file to a "story" in drupal. I can attach similar smaller files, but when i try this one and larger sizes i get in HTTP Error 0 message after a minute or to. I have checked all my max upload, Max Mem sizes they are set at well over 8M at 64M and 256M. Anyone else have this issue uploading files ever?
Maybe the script timeout is reached before the file is uploaded, try to set a higher maximum execution time for your php scripts.
The file size limits in php are upload_max_filesize and post_max_size, you can also try to increase those, see also http://drupal.org/node/97193
There seem to be a lot of possible reasons for this error, and the main problem is that Drupal core does not report any detail on AJAX failures - thus anything could be going wrong, but you're just seeing the "Error 0" text.
One possible way to diagnose this is to turn JavaScript off (for example, by using NoScript in FireFox) and try uploading again - then you may see the full error text, which will tip you in the direction of further investigation.
Some more discussion and some possible solutions (you'll see that there are many, since there are many possible causes to this problem) can be found here: http://drupal.org/node/297035?mode=2&sort=2
I installed the jquery update module and its fixed.
Install the jquery update from:
http://drupal.org/project/jquery_update

Efficient way of truncating a trace file when it gets too big?

I'm using .NET's built-in Tracing mechanism to trace program execution. The problem is the trace file can grow to several MB very quickly. Is there an efficient way of truncating the file when it grows past a certain point? I thought of putting in a check whenever something gets written (I have a custom class that inherits from TraceListener) but that might degrade performance too much. Maybe a Timer would be a better solution?
Anyone have any ideas?
Implement a custom trace listener:
Let's see how we can solve fairly common task: managing continuously generated trace files. Default trace listener implementation is not really suitable for service applications that are supposed to be always active. If application produces a lot of trace output, then sooner or later this information will use up all disk space.
http://www.codeproject.com/KB/dotnet/customnettracelisteners.aspx?display=Print
With this example, you are able to create log chunck like this:
MyTrace.txt (recent trace information);
MyTrace00.txt (trace history backup);
MyTrace01.txt (trace history backup);
and so on...
Of course, you can throw backup files away.
(Just a hint: try log4net (here) and Enterprise Library Logging Block (here)!)
Perhaps use an Event Log trace listener, since the EventLog can be easily automatically cycled in this way.

Looking for a simple explanation on using trace logging

I have seen several projects that use the Trace functionality to capture events and stream them out to a log file. I have been unsuccessful in finding a simple to follow guide that will show me how to configure Trace to capture and write said logfile. Does anyone have a link recommendations, or provide some simple steps to follow?
The Trace object writes the statements to any attached TraceListeners. You can build your own, but there are a number already defined in the System.Diagnostics namespace, including:
ConsoleTraceListener (Console)
DefaultTraceListener (Visual Studio / Debugger)
DelimitedListTraceListener (TextWriter, special formatting)
EventLogTraceListener (EventLog - anything that inherits from System.Diagnostics.EventLog)
TextWriterTraceListener (TextWriter - think file)
You can, of course, inherit your own from the TraceListener class that writes to where ever you want. For example, you could log to a database, have it send e-mails or pages in certain situations, or write the statements back to a logging platform like log4net.
The big thing is that you need to create an instance of whatever listeners you want and then add them to the Trace' class Listeners collection. You can add as many as you need and Trace will write to all of them. This way, you can write your logging code once using a well-supported and understood object that's part of the framework, and you can attach anything you need to it.
I stumbled into a MSDN article that really helps. Sorry I didn't find it before posting the question but perhaps others may have the same question and haven't found this link.
Take a look at logging frameworks. We rolled out own, but are now migrating over to log4net available free at http://logging.apache.org/log4net/
Im looking for a way to set the Category of the EventLog, the FormattedEventLogTraceListener writes into (not the category of the message).
But I can't find an appropriate property of this class.
Is it possible to set this?

Resources