Has anyone tried deploying unsafe code in Azure? I’m working with code containing unsafe blocks dealing with pointers and all that fun stuff. And I’m wondering if that has something to do with errors I’m getting trying to deploy/upgrade the web project in Azure.
Also, is there actually a way to view specific errors that are breaking the upgrade?
Fyi, yes I do have ‘allow unsafe code’ checked in my web project settings.
Thanks in advance.
UPDATE:
This is the error I get trying to upgrade…
Role instances recycled for a certain
amount of times during an update or
upgrade operation. This indicates that
the new version of your service or the
configuration settings you provided
when configuring the service prevent
role instances from running. The most
likely reason for this is that your
code throws an unhandled exception.
Please consider fixing your service or
changing your configuration settings
so that role instances do not throw
unhandled exceptions. Then start
another update or upgrade operation.
Until you start another update or
upgrade operation, Windows Azure will
continue trying to update your service
to the new version or configuration
you provided
A lot of folks run ‘unsafe’ code in various forms (mostly native C/C++). If the role is recycling, you have an unhandled exception that may or may not be related to the unsafe code. I would suggest several things:
1) Try running the code local in the DevFabric
2) Check your On_Start block. Surprisingly often this is where the problem is (e.g. bad path, bad config, etc.)
3) Enable the diagnostics logging and see if you can get any trace info.