ASP.MVC 4, Azure Caching: Error on both local and remote - "role discovery data is unavailable" - asp.net-mvc-4

Whew...ok, been wrestling with this for a while and I can't figure out what is going on.
I am new to Azure caching, but at this point I have read a good bit and I think I have it setup right, but something is obviously wrong so what do I know?
Ok, so first I setup a dedicated caching web worker role using this fine tutorial: http://berniecook.wordpress.com/2013/01/27/distributed-caching-in-azure-cache-worker-role/
I have an ASP.net MVC 4 website that is supposed to be using it.
I have my solution set to multiple starting projects with my cloud caching project set to start first, but no matter what I do, I get the "role discovery data is unavailable".
Sometimes in my output log I get that the Role Environment failed to initialize, but not very often. Most of the time the output log says that is succeeds. Regardless of that, I still get the error above.
I was thinking that maybe the issue was because I was running on local azure storage and compute emulators, so I reconfigured and published the Cloud Service to Azure to see if that helped.
It didn't...
The fun part is that there have been exactly 2 times when it suddenly worked (both when I was working locally). 2 times about of about 100. I didn't do anything different...just ran the debugger and poof, it all worked. This at least lends a bit of credit that it is actually setup correctly.
Needless to say, this is putting a huge damper on my productivity so any advice would be appreciated.
Update
Ok, I have figured out a workaround of sorts...I have learned that the reason that it consistently failed was because the development web server was holding onto a file which prevented the caching server to launch correctly.
The workaround is to stop the web server each and every time I want to recompile and run the code. This is obviously not ideal, so any ways to make this more reliable would be appreciated.
Thanks,
David

I don't know if this helps but I find that if I don't shut down the both the storage and compute emulator, I get weird errors, so after doing an F5 and closing the browser down, I manually shut down both emulators

Related

Windows Server 2008 R2 error 1053 apache

I have a simple PHP application running on this server which allows other people to verify some information on-line. The apache was running OK until a few days back.
The application uses Postgrees and the apache service was configured by an add-on "Enterprise Db Apache", it was not configured by me and is connected to a portal to be shown on-line. This was kinda dropped on me and I had no prior knowledge or experience with databases nor servers and need to put it back on-line. How can I start to find out what made it stop?
Here's a link to the error I'm receiving when trying to start it back again:
https://dl.dropboxusercontent.com/u/12837412/Erro%201053.png
Tried updating .NET to no success,
I've searched around SO and all the threads I found were based on custom services people wrote, and found out that this error code is very generic, I'm very lost and have my neck on the chopping block.
EDIT: Tried some fixes suggested here but had no success. I'm thinking about reinstalling the service, is it a really bad idea? Is there a safe way of doing this without loss of data in the Database? Is there a tutorial on this here already?
The problem was with compatibility of the versions of C/C++ libraries in the server which lead to the programs related to the service not being able to start properly. A simple reinstalation of the compatible version of the libraries made the service able to be started again.
Maybe your service is taking longer time than 30 seconds (Windows default timeout) to start and report ready to the Service Control Manager. Usually this happens because of performance issues.
A possible solution for this is to extend it through the Registry.
Go to Start > Run > and type regedit
Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
With the control folder selected, right click in the pane on the right and select new DWORD Value
Name the new DWORD: ServicesPipeTimeout
Right-click ServicesPipeTimeout, and then click Modify
Click Decimal, type '180000', and then click OK
Restart the computer

DCOS: not able to start any service is always shows deploying

Enviornment :
DCOS : 1.7 running on vagrant
There are many reasons this could fail, but you did not provide enough information to narrow it down. However, the most common problem observed when getting started is missing the bit about having a private vs public agent available and the role being specified in the app json. I can't tell from the single screen shot what environment you are running or the json for the apps you were trying to run. If you are really stuck, try visiting https://dcos.io/docs/1.7/administration/installing/custom/troubleshooting/ and check out their slack channel for assistance. https://dcos-community.slack.com/
I got the same problem when installing DCOS form the Azure template, when I logged in, it appeared that I had 0 nodes connected in my cluster (which is obviously not good). I reinstalled it from another template and it fixed my problem. Hope it helps.

Debug a test that only fails on TeamCity

I have several random failing integration tests running on TeamCity. These tests do not fail locally. I've even tried making my local site hit the dev database.
Does anyone have experience debugging weird issues like this?
We are using MVC 4 (C#) and MSBuild.
As commented, you don't give lots of information, but the straightforward anser to the question "how to debug this" would be to put a System.Diagnostics.Debugger.Break(); statement right before the failing test. Then you'll have the chance to attach the debugger, and off you go.
The issue I was having was with a load balanced solution. The two web servers were out of sync causing odd timing issues.
One web server would save it, then another would pick it up to the processing and the time was in the past.

Silverlight Application gives 4004 error when trying to use RIA services

I have written a Silverlight application that is basically an account registration form. I have been able to successfully deploy this to one of our production servers running windows server 2008/IIS7. While this took some time to do, I was able to work through and solve the issues that came up fairly easily. Now I am trying to deploy the application on our main production server. This server is running windows 2003/IIS6 and this is where I have hit some problems.
I have solved most of the issues and now the silverlight application will load and I can see the form for a few seconds before it disappears. I believe during this time it is trying to load data from the database using the RIA services.
In IE I get the following error:
Webpage error details
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.Windows.Markup.XamlParseException:
System.Windows.Markup.XamlParseException:
System.Windows.Markup.XamlParseException:
Cannot find a Resource with the Name/Key ApplicationResources [Line: 6 Position: 9]
I believe it must be a configuration issue in IIS6 because the app works fine on IIS7 but I am drawing a blank as to what to try. I have spent hours trying to find a solution to this particular problem and while others have mentioned getting this problem the answers always tend to be non-specific in nature.
This is what I have done so far:
Added New Application Pool for .NET 4.
Set the website to use .NET 4 on the ASP.NET tab (nearly had heart failure when this did an iisreset).
Added the MIME types for Silverlight .xaml, .xap, etc.
Unchecked Integrated Windows Authentication (was giving an error when checked).
Give Execute permissions to Scripts and Executables.
Recycled the application pool.
The one thing I have seen suggested but have not tried is an iisreset, and while I am not entirely convinced that doing this would solve the problem, we have scheduled this to be done tonight (if I cannot find a solution before then).
So basically I am wondering if anyone out there has seen this problem and knows how to solve it?
UPDATE 1: We tried an iisreset last night and as I expected this did not solve the problem.
Okay I have solved the problem. As suggested I did a WCF trace on the application. This highlighted the REAL problem straight away, which was 'The SELECT permission was denied on the object...'. Once I fixed this the application works as I expected. It turns out that a colleague of mine had already made this permission change on our other server (running IIS7) so that was why it worked there (this is bad - I know).
Also it didn't help that the javascript error I was receiving on the client side (shown in the question) had nothing to do with the underlying issue and led me well and truly up the garden path.

IIS reset details

What exactly happens when we do IISreset? What resources get released? We have an ASP.Net website (.net 1.1) which use Crystal reports 11. Lately, running reports are throwing several crystal report specific exceptions and then the users can't run reports anymore. Resetting IIS lets the users log back in and run the reports until it fails the next time. Knowing exactly what resources are released when IIS is reset will help us dig deeper to find the root cause. Any help?
Pretty much everything. All thread pools, asp, asp.net, shared memory, etc... will all be purged. Doing in IISReset is basically the same as going to Services->WWW Service->Restart. Also, it will affect SMTP and FTP if you are running these services as well.
To narrow your problem down slightly ( and to reduce impact ), you should try putting your website in its own App Pool. Then when it next hangs, see if restarting the app pool fixes the problem. Then you are limiting things to just one running web application, not completely taking down iis. If the problem persists and still requires an IISReset, you at least have one more datapoint to work with.
EDIT: In response to your additional comment, I would suggest you do as much logging as possible and see if the problem becomes obvious. http://learn.iis.net/page.aspx/579/advanced-logging-for-iis-70---custom-logging/
Obviously, a quick run through Event Viewer is probably a good idea.