Problems & Solutions - SingletonTheory/SingletonTheory.github.io GitHub Wiki
This page outlines some issues that was picked up during the development with their solutions. Simple, short & precise.
When using ServiceStack's JSONServiceClient an issue came up where the max size limit of messages was hit. The exact message returned was as follows:
"The underlying connection was closed: The message length limit was exceeded"
Add the following items to the web.config file:
<system.web>
<httpRuntime maxRequestLength="1048576" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
When doing GET requests against Nginx an issue came up where the max size limit of messages was hit. The exact message returned was as follows:
"upstream sent too big header while reading response header from upstream"
Add the following items to the nginx.conf file under the http section:
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
When putting your AngularJS app in HTML 5 mode with the following lines in your app.js, you might get an endless loop, causing all kinds of issues.
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
Change the base href in the index.html header to:
<base href="/" />
Remove the $locationProvider.hashPrefix('!'); in your app.js
If you have deep links in your application like: /auth/authadmin/roleadmin, you might find that you get a number of obscure issues when you refresh the page. The errors might include as follows:
Uncaught SyntaxError: Unexpected token <
or
Resource interpreted as Script but transferred with MIME type text/html: ""
Change/Add the base href in the index.html header as:
<base href="/" />
http://stackoverflow.com/questions/17485627/angular-js-deep-linking-routeprovider-reload-not-working
When setting up a Bootstrap Tab as in the documentation, Angular uses the href and tries to route accordingly. This has the negative effect of you not being able to see the tab.
When using the Bootstrap 3 Tabs, simply add target="_self" the following to your anchor as follows:
<a data-toggle="tab" href="#panel_overview" target="_self">Overview</a>
This allows the Bootstrap items to do what they want to do and you to use the default functionality as intended. No JavaScript needed.
AngularJS Docs: http://docs.angularjs.org/guide/dev_guide.services.$location Forum: https://groups.google.com/forum/#!topic/angular/yKv8jXYBsBI