Unexpected recycling of worker role

Hi all
I've deployed a worker role to Azure and it ran smoothly from February 3rd to February 25th.
On February 26th, the worker role was "silently" recycled.
I would like to understand what happened and if there are scheduled recycling operations or specific conditions triggering a recycle.
The VM was operating normally for both CPU and memory. I couldn't find any error in Event viewer or in stored diagnostics.
This is the only useful message (WAHostBootstrapper.log):
[00002252:00003224, 2015/02/26, 03:52:06.491, INFO ] Sending shutdown notification to client DiagnosticsAgent.exe (2248).
[00002252:00003224, 2015/02/26, 03:52:06.491, INFO ] Sending shutdown notification to client WaWorkerHost.exe (2904).
Thanks
Francesco

Hi Francesco,
Is your worker role instances in recycling status currently? Which region did you host your  cloud service?
I saw some mantance log about cloud service /VM from Azure Status dashboard (http://azure.microsoft.com/en-us/status/#history ):
Virtual Machines \ Service Management and Cloud Services \ Service Management - West Europe - Advisory
This incident has now been mitigated. From 26 FEB, 2015 23:00 to 27 FEB, 2015 08:15 UTC a subset of customers using Cloud Services \ Service Management and Virtual Machines \ Service Management in West Europe might have seen failures when attempted to
create new VMs or to restart their existing VMs.
If you always have this issue, please let me know.
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How is a Worker Role hosted?

    Hi
    How is a worker role hosted in Azure. What process is it in?
    I'm thinking of how to test locally or an on premise version. Is the Azure host process simply a windows service?
    I'm writing a solution that uses the Service Bus for Window Server 1.1 as my customers all use on-premise servers (at the moment). It would be handy if I could create a worker role for on premise solutions :)
    Thanks
    Graham

    Hi Graham,
    Thanks for your posting!
    Base on my understanding, Azure worker role is used for some services would run in the background to collect, transform, and prepare data.  In other words, Azure work role could
    executive function to a background processor .
    In worker role project, we could see  the file named "WorkerRole.cs". The class inherited the "RoleEntryPoint".
    public class WorkerRole : RoleEntryPoint
    public override void Run()
    // This is a sample worker implementation. Replace with your logic.
    Trace.TraceInformation("WorkerRole1 entry point called");
    while (true)
    Thread.Sleep(10000);
    Trace.TraceInformation("Working");
    public override bool OnStart()
    // Set the maximum number of concurrent connections
    ServicePointManager.DefaultConnectionLimit = 12;
    // For information on handling configuration changes
    // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
    return base.OnStart();
    When one worker role instance was starting, it could be executed "OnStart()" method firstly. Then in a worker role’s lifecycle is the "Run" method, typically implemented as an infinite loop, such as "While(true) ".
    In fact, if the Run method terminated, the instance would be restarted or recycled again. Please see this video (http://channel9.msdn.com/Series/Windows-Azure-Cloud-Services-Tutorials/Introduction-to-Windows-Azure-Worker-Roles-Part-1).
    For your question----" Is the Azure host process simply a windows service?", the answer is that one worker role can be one or more than one instance (VM).
    And in your scenarios, Worker role could meet your requirement. In VS, Azure SDK support one project template named "Worker role with service bus queue". Please see this documents:
    http://msdn.microsoft.com/en-us/library/azure/jj149831.aspx
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Azure Worker Role reboots when adding instance of Web Role

    I have a Windows Azure cloud service with a Web Role and a Worker Role. I I have built a website that allows me to perform various management functions against the cloud service (stop/start, reboot instance, add instance, remove instance). All functions are
    performed via the web api. My issue is that when I add an instance of the web role, the worker role reboots. Note that this doesn't happen if I add an instance via the Azure portal. The code functions correctly in all other aspects. Any idea how to do this
    so that only the role being affected recycles instead of all roles recycling?
    My code:
     public void AddInstance()
            XDocument configDoc = this.GetDeploymentConfiguration();
            var ns = configDoc.Root.GetDefaultNamespace();
            configDoc.Root
                .Elements( ns + "Role" )
                .FirstOrDefault( r => r.Attribute( "name" ).Value.ToLower() == this.RoleName.ToLower() )
                .Element( ns + "Instances" )
                .Attribute( "count" )
                .Value = ( int.Parse( configDoc.Root
                               .Elements( ns + "Role" )
                               .FirstOrDefault( r => r.Attribute( "name" ).Value.ToLower() == this.RoleName.ToLower() )
                               .Element( ns + "Instances" )
                               .Attribute( "count" )
                               .Value ) + 1 ).ToString();
            string encodedString = Convert.ToBase64String( Encoding.UTF8.GetBytes( configDoc.ToString() ) );
            this.SetDeploymentConfig( encodedString );
        public XDocument GetDeploymentConfiguration()
            string uri = string.Format( this.servicePropertiesOperationFormat, this.subscriptionID, this.serviceName, "production", "" );
            ServiceManagementOperation operation = new ServiceManagementOperation( this.thumbprint, this.versionID );
            var xdoc= operation.Invoke( uri );
            var myelm = xdoc.Element( wa + "Deployment" ).Element( wa + "Configuration" );
            var mystring=  Encoding.UTF8.GetString( Convert.FromBase64String( myelm.Value ) );
            return XDocument.Parse( mystring );
        public string SetDeploymentConfig( string configurationFile )
            string uri = string.Format( this.servicePropertiesOperationFormat, this.subscriptionID, this.serviceName, "production", "/?comp=config" );
            ServiceManagementOperation operation = new ServiceManagementOperation( this.thumbprint, this.versionID );
            string payloadString = string.Format(
                @"<?xml version=""1.0"" encoding=""utf-8""?>
                <ChangeConfiguration xmlns=""http://schemas.microsoft.com/windowsazure"">
                        <Configuration>{0}</Configuration>
                </ChangeConfiguration>", configurationFile );
            XDocument payload = XDocument.Parse( payloadString );
            return operation.Invoke( uri, payload );

    Hi,
    From my experience, if you add one role instance, the whole cloud service will run in translating state, and this cloud service will stop to working, so maybe this is a future request.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Async / Await in Cloud Services Worker Roles?

    Good evening,
    I was wondering if and how one would be able to utilize async / await for Azure Cloud Services' Worker Roles? Basically I have background jobs that will/shall run on worker roles, however many of those are performing up/downloads from Azure Storage blobs
    and ideally I'd like to await those calls.
    So is async/await natively supported for CS Worker Roles (using Azure SDK 2.5) and if so, how? And if not.. is it planned at all?
    Thanks,
    -Jörg

    Hi,
    I would suggest you have a look at this thread:
    http://stackoverflow.com/questions/15991287/async-await-in-azure-worker-role-causing-the-role-to-recycle
    A simple solution is to just do this:
    public override void Run()
    RunAsync().Wait();
    public async Task RunAsync()
    while (true)
    await Task.Delay(60000);
    Hope this helps.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Worker Role Store Values In Memory

    I am attempting to port a Windows Service to an Azure Cloud Service and a Work Role.
    Everything worked, except the difference is in the Windows Service I could start a class that holds two timers that run forever.
    From what I saw my Cloud Service created the instance of the class, but it looked like after it was finished executing a new Worker Role instance was created.
    Is there anyway to start something and just keep it running?
    My Windows Service I kept a property of Running and RunNumber and both of these values are not storing the value in the next run.
    I can look up the values between runs in SQL if I need to, just seems like there ought to be a way to process and keep alive.
    Thanks if you can shed some life on lifetime of Worker Roles and how to persist items in memory.

    Hi Data Juggler,
    I suggest that you can define the code in your timer to the method  Run() in your Worker Role.
     You can override the Run method to implement a long-running thread for your role instance. If you do override the Run method, your code should block indefinitely.
    Since your worker role is always running, so the value in it will be persisted in memory.
    If the Run method returns, the role is automatically gracefully recycled; in other words, Windows Azure raises the Stopping event and calls the OnStop method so that your shutdown sequences may be executed before the role is taken offline.
    For the lifecycle of the role in Cloud Service ,I suggest that you can refer to the link below:
    http://msdn.microsoft.com/en-us/library/azure/hh180152.aspx
    Best Regards,
    Kevin Shen.

  • Is this the best design for asynchronous notifications (such as email)? Current design uses Web Site, Azure Service Bus Queue, Table Storage and Cloud Service Worker Role.

    I am asking for feedback on this design. Here is an example user story:
    As a group admin on the website I want to be notified when a user in my group uploads a file to the group.
    Easiest solution would be that in the code handling the upload, we just directly create an email message in there and send it. However, this seems like it isn't really the appropriate level of separation of concerns, so instead we are thinking to have a separate
    worker process which does nothing but send notifications. So, the website in the upload code handles receiving the file, extracting some metadata from it (like filename) and writing this to the database. As soon as it is done handling the file upload it then
    does two things: Writes the details of the notification to be sent (such as subject, filename, etc...) to a dedicated "notification" table and also creates a message in a queue which the notification sending worker process monitors. The entire sequence
    is shown in the diagram below.
    My questions are: Do you see any drawbacks in this design? Is there a better design? The team wants to use Azure Worker Roles, Queues and Table storage. Is it the right call to use these components or is this design unnecessarily complex? Quality attribute
    requirements are that it is easy to code, easy to maintain, easy to debug at runtime, auditable (history is available of when notifications were sent, etc...), monitor-able. Any other quality attributes you think we should be designing for?
    More info:
    We are creating a cloud application (in Azure) in which there are at least 2 components. The first is the "source" component (for example a UI / website) in which some action happens or some condition is met that triggers a second component or "worker"
    to perform some job. These jobs have details or metadata associated with them which we plan to store in Azure Table Storage. Here is the pattern we are considering:
    Steps:
    Condition for job met.
    Source writes job details to table.
    Source puts job in queue.
    Asynchronously:
    Worker accepts job from queue.
    Worker Records DateTimeStarted in table.
    Queue marks job marked as "in progress".
    Worker performs job.
    Worker updates table with details (including DateTimeCompleted).
    Worker reports completion to queue.
    Job deleted from queue.
    Please comment and let me know if I have this right, or if there is some better pattern. For example sake, consider the work to be "sending a notification" such as an email whose template fields are filled from the "details" mentioned in
    the pattern.

    Hi,
    Thanks for your posting.
    This development mode can exclude some errors, such as the file upload complete at the same time... from my experience, this is a good choice to achieve the goal.
    Best Regards,
    Jambor  
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to move worker roles to VM?

    I've developed an app that has 3 worker roles and a web role.  The client has decided that they want to put this on a VM.  I understand how to handle the web role but I am unclear how I convert the worker roles.  I've searched but I can't
    find anything that directly guides me on what's needed.  Does anyone know of a link that would show me how to convert over?

    The easiest way to develop a Windows Service in my opinion is using
    Topshelf.
    You can convert your Worker Role code across pretty easily by
    calling the Run code from the WhenStarted event, the OnStop code from the WhenStopped event and the OnStart code from the constructor of your service class.
    Alternatively, you can
    inherit the ServiceControl interface and implement the Start and Stop methods.
    Deploying the service is easy too. Simply get the built files from your console app (a Topshelf service is simply a console app) and
    invoke the app (e.g. PowerShell script) with the install parameter, then again with the start parameter.

  • Running mail server on Worker Role

    I'm trying to use a Worker role to setup an SMTP server.  I used Visual Studio to provision the worker role, assigned a ReservedIP address to it, setup ReverseDNS, and specified an inputendpoint for SMTP on port 25.  
    Question, when you specify an InputEndpoint, does it poke a hole in the firewall of the VM? Or does it assign that to the WorkerRole application?  I wanted to use a Web Service instead of a regular VM to install an SMTP server, but I'm not having any
    luck.  I installed SmarterMail on the Worker Role service and cannot get port 25 to respond for Smartermail.  It sends mail just fine, but is blocked for inbound SMTP.
    Any ideas?
    Jim Braun

    Hi,
     Thanks for Posting.
     Yes, Input Endpoints enable External Traffic to be load balanced to your Web/Worker Role VM  through the Firewall.
     You might want to check this thread for additional information :
    https://social.msdn.microsoft.com/Forums/en-US/1e284bf7-2f9d-44ca-b5f8-f29a8654633a/receive-email-using-worker-role?forum=windowsazuredevelopment
     Also refer to this Link which talks about setting up SMTP on worker role :
    http://blog.smarx.com/posts/emailtheinternet-com-sending-and-receiving-email-in-windows-azure
    Regards,
    Nithin.Rathnakar

  • VS 2013 crashes on opening Worker Role configuration

    After creating a cloud project using Azure SDK for .NET 2.4 then Visual Studio 2013 (update 3) crashes when I attempt to edit the Role Configuration via the UI by double clicking the [Cloud Project] -> Roles -> [Worker Role Name] in Solution Explorer.
    The event details as text looks like this.
    Application Error
    Log Name: Application
    Source: Application Error
    Date: 12-09-2014 10:33:59
    Event ID: 1000
    Task Category: (100)
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: [removed].[removed].com
    Description:
    Faulting application name: devenv.exe, version: 12.0.30723.0, time stamp: 0x53cf6f00
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x53159a86
    Exception code: 0xe0434352
    Fault offset: 0x0000c42d
    Faulting process id: 0x1f54
    Faulting application start time: 0x01cfce63c98e92fb
    Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
    Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
    Report Id: 8a86cb32-3a57-11e4-857a-0026b9e0fb6f
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-09-12T08:33:59.000000000Z" />
    <EventRecordID>213664</EventRecordID>
    <Channel>Application</Channel>
    <Computer>[removed].[removed].com</Computer>
    <Security />
    </System>
    <EventData>
    <Data>devenv.exe</Data>
    <Data>12.0.30723.0</Data>
    <Data>53cf6f00</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>6.1.7601.18409</Data>
    <Data>53159a86</Data>
    <Data>e0434352</Data>
    <Data>0000c42d</Data>
    <Data>1f54</Data>
    <Data>01cfce63c98e92fb</Data>
    <Data>C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe</Data>
    <Data>C:\Windows\syswow64\KERNELBASE.dll</Data>
    <Data>8a86cb32-3a57-11e4-857a-0026b9e0fb6f</Data>
    </EventData>
    </Event>
    .NET Runtime
    Log Name: Application
    Source: .NET Runtime
    Date: 12-09-2014 10:33:59
    Event ID: 1026
    Task Category: None
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: [removed].[removed].com
    Description:
    Application: devenv.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.AggregateException
    Stack:
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(System.Object)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    at System.Windows.Threading.DispatcherOperation.InvokeImpl()
    at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    at System.Windows.Threading.DispatcherOperation.Invoke()
    at System.Windows.Threading.Dispatcher.ProcessQueue()
    at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-09-12T08:33:59.000000000Z" />
    <EventRecordID>213663</EventRecordID>
    <Channel>Application</Channel>
    <Computer>[removed].[removed].com</Computer>
    <Security />
    </System>
    <EventData>
    <Data>Application: devenv.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.AggregateException
    Stack:
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.&lt;ThrowAsync&gt;b__4(System.Object)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    at System.Windows.Threading.DispatcherOperation.InvokeImpl()
    at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    at System.Windows.Threading.DispatcherOperation.Invoke()
    at System.Windows.Threading.Dispatcher.ProcessQueue()
    at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
    at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
    </Data>
    </EventData>
    </Event>
    Just prior to the crash...
    ...it seems like VS 2013 is attempting to log me in to a company server (active directory?). Regardless of my action (providing my login credentials or cancelling the login) VS 2013 then proceeds to crash.
    My other computers
    On my private laptop that connects to the internet via a private internet connection, the same type of project loads the configuration page w.o. issues (same VS and SDK configuration).
    Others have this issue as well
    There is also a thread about this on SO, although without a solution:
    Visual Studio 2013 crashes when opening up service configuration for edit
    Can anybody provide any help about how to solve this, please?
    Br,
    Claus

    Hi Will
    Thanks for your answer - I have added my findings below:
    The problem apparently stems from the authentication process.
    If you are using your company email as username on Azure, the inherent domain name will cause the authentication method to redirect you to your company's Active Directory.
    The problem can be solved by choosing a different email as username on Azure.
    The problem can also be replicated by setting up a website with authentication using Azure Active Directory. During login through Azure AD, the exact moment you enter the domain name in your username, the login screen redirects you from the Azure AD to the
    AD at sts.[email domain name] - and consequently, the login fails. Using a different username the Azure AD authentication works flawlessly.
    Br,
    Claus

  • What are Azure limitations for Websockets in Cloud Services (web and worker role)?

    A WebSocket Server should be built on Azure platform with OnPrem connections and have questions regarding limitations for Websockets in Azure Cloud Services - web and worker roles.
    Websockets can be configured for Web Sites and limitations are understood, but Azure Websites is not an option. 
    Nevertheless it is planned to run a web service (without UI - no web site) as a Cloud service which has secure websocket (WSS) connections to OnPrem machines. Websocket protocol is enabled for IIS8 on Cloud services web and worker roles. Azure Service Bus Relay
    is not an option.
    Questions:
    1) Are Websockets supported for Azure Cloud services web and worker roles? we assume yes
    2) What are potential limitations from Azure side to support concurrent Websocket connections? We are aware that CPU, memory etc are limitations, but are there additional limitations from MS Azure side? 
     

    Hi,
    As I know, azure cloud service web and worker role support Websockets, users can connect to the role via the special endpoint, if we use Azure cloud service, I think we can monitor the metrics such as CPU, memory, etc... and scale our cloud service via these
    metrics to keep the websockets working, refer to
    http://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-scale/ for more information about how to scale a cloud service.
    Regards

  • Worker Role problems (doesn't work without debugging)

    Hello,
    I upgraded the OS Version up to 3 last week and everything worked OK. But yesterday worker role stopped working. Windows Azure manager showed that service started up OK. I tried to find problem in code and found out that Worker Role works just great during
    the debug only. 
    Here is ServiceDefinition.csdef code:
    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="Workers" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0">
    <WorkerRole name="EventsProcessor" vmsize="ExtraSmall">
    <Startup>
    <Task commandLine="startup\regeventsrc.cmd" executionContext="elevated" taskType="simple" /> <!-- Here is code: EVENTCREATE /L Application /T Information /ID 123 /SO "FSPLogging" /D "FSP Logging Enabled" -->
    </Startup>
    <Imports>
    <Import moduleName="RemoteAccess" />
    <Import moduleName="RemoteForwarder" />
    </Imports>
    <LocalResources>
    <LocalStorage name="ZipContainer" cleanOnRoleRecycle="true" sizeInMB="12000" />
    <LocalStorage name="CrashDumpsContainer" cleanOnRoleRecycle="false" sizeInMB="1024" />
    </LocalResources>
    </WorkerRole>
    </ServiceDefinition>
    Can someone please help? What should I check first?
    Thanks!

    Hi Alex,
    Thank you for advice. I copied the exact connection string from the Azure Management Portal and Worker Role started to work.
    Old connection string was:
       connectionString="Data Source=xxx.database.windows.net;Pooling=false;Initial Catalog={dbName}; User ID={userName}; Password={password};"
    The new one is:
       connectionString="Server=tcp:xxx.database.windows.net,1433;Database={dbName};User ID={userName}@xxx;Password={password};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"
    Anyway sometimes (very rarely... once in a 2-3 hours) I get next error:
    "System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL
    Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed
    to respond.) ---> System.ComponentModel.Win32Exception (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
    Probably do you have some ideas regarding this?
    Thanks a lot
    Alex

  • Autoscaling Application block for Azure worker role console app not working. Get error as The HTTP request was forbidden with client authentication

    I have written a console application to test the WASABi(AutoScaling Application Block) for my worker role running in azure. The worker role processes the messages in the queue and I want to scale-up based on the queue length. I have configured and set the
    constraints and reactive rules properly. I get the following error when I run this application.
    [BEGIN DATA]{}
        DateTime=2013-12-11T21:30:02.5731267Z
    Autoscaling General Verbose: 1002 : Rule match.
    [BEGIN DATA]{"EvaluationId":"4f9f7cb0-fc0d-4276-826f-b6a5f3ea6801","MatchingRules":[{"RuleName":"default","RuleDescription":"The default constraint rule","Targets":["AutoscalingWebRole","AutoscalingWorkerRole"]},{"RuleName":"ScaleUpOnHighWebRole","RuleDescription":"Scale
    up the web role","Targets":[]},{"RuleName":"ScaleDownOnLowWebRole","RuleDescription":"Scale down the web role","Targets":[]},{"RuleName":"ScaleUpOnHighWorkerRole","RuleDescription":"Scale
    up the worker role","Targets":[]},{"RuleName":"ScaleDownOnLowWorkerRole","RuleDescription":"Scale down the worker role","Targets":[]},{"RuleName":"ScaleUpOnQueueMessages","RuleDescription":"Scale
    up the web role","Targets":[]},{"RuleName":"ScaleDownOnQueueMessages","RuleDescription":"Scale down the web role","Targets":[]}]}
        DateTime=2013-12-11T21:31:03.7516260Z
    Autoscaling General Warning: 1004 : Undefined target.
    [BEGIN DATA]{"EvaluationId":"4f9f7cb0-fc0d-4276-826f-b6a5f3ea6801","TargetName":"AutoscalingWebRole"}
        DateTime=2013-12-11T21:31:03.7516260Z
    Autoscaling Updates Verbose: 3001 : The current deployment configuration for a hosted service is about to be checked to determine if a change is required (for role scaling or changes to settings).
    [BEGIN DATA]{"EvaluationId":"4f9f7cb0-fc0d-4276-826f-b6a5f3ea6801","HostedServiceDetails":{"Subscription":"psicloud","HostedService":"rmsazure","DeploymentSlot":"Staging"},"ScaleRequests":{"AutoscalingWorkerRole":{"Min":1,"Max":2,"AbsoluteDelta":0,"RelativeDelta":0,"MatchingRules":"default"}},"SettingChangeRequests":{}}
        DateTime=2013-12-11T21:31:03.7516260Z
    Autoscaling Updates Error: 3010 : Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClientException: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'rmsazure'
    in subscription id 'af1e96ad-43aa-4d05-b3f1-0c9d752e6cbb' and deployment slot 'Staging'. ---> System.ServiceModel.Security.MessageSecurityException: The HTTP request was forbidden with client authentication scheme 'Anonymous'. ---> System.Net.WebException:
    The remote server returned an error: (403) Forbidden.
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       --- End of inner exception stack trace ---
    Server stack trace: 
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory`1 factory)
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    If anyone know why I am getting this anonymous access violation error. My webrole is secured site but worker role not.
    I appreciate any help.
    Thanks,
    ravi
      

    Hello,
    >>: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'rmsazure' in subscription id **************
    Base on error message, I guess your azure service didn't get your certificate and other instances didn't have certificate to auto scale. Please check your upload the certificate on your portal management. Also, you could refer to same thread via link(
    http://stackoverflow.com/questions/12843401/azure-autoscaling-block-cannot-find-certificate ).
    Hope it helps.
    Any question or result, please let me know.
    Thanks
    Regards,
    Will 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Guidance needed please for architecting a scheduled application process (Worker Role vs. VM Role)

    I'm close to putting all of the pieces together for an Azure Cloud Services solution that I want to build. 
    My goal is to build a .NET Library (or perhaps a Windows Service or even a Console Application) that will run once a day to execute dynamic queries against an Azure SQL DB. 
    There would be 1-x numbers of these query sets that will need to be run during the process, and after each query set an email will be sent out containing data from the query results (which shouldn't be terribly large or processor intensive) to an email
    recipient specific to that data set.  I plan on using an assigned Office 365 Mailbox as the sender account and email recipients would all be in the same Exchange organization. 
    I haven't decided on the emailing API yet, but it may require dependencies to be installed on Windows Server (e.g. the MAPI subsystem, AKA the Mail applet in Control Panel - so I can use Redemption which is a third-party replacement for the Outlook Object
    Model that doesn't require Outlook to be installed) unless I go with Exchange Web Services or the Office 365 REST APIs.
    So my main question is what's more appropriate, a VM or a Worker Role?
    Since the processing should only take 5-10 minutes to complete, I'd like to minimize the uptime of the VM or Worker Role and be able to turn it on when the scheduled time occurs, and turn it off when
    the processing is done.
    I'm also trying to understand how to fit in either the Azure Scheduler Service or the Windows Task Scheduler in the OS to auto-run my .NET application and/or Worker Role/VM.
    Any guidance would be appreciated!
    Eric Legault (MVP: Outlook)
    Co-author, Microsoft Office 2013 Professional Step-By-Step
    Try Outlook Touch!

    Hello Eric,
      There is currently no Option for automatically deploying an Azure Role, running it and then Shutting it down or Deleting it. That kind of functionality is possible using the
    Windows Azure service Management API which is used by  the Windows Azure PowerShell cmdlets.
    Regards,
    Nithin Rathnakar

  • 'Not running in a hosted service or the Development Fabric' exception on deployed Worker role

    We are getting this exception after a worker role has been operating fine in production for several weeks.  Once this exception starts getting reported, it will keep getting it every time the worker role tries to access anything with the Diagnostics:
    Not running in a hosted service or the Development Fabric
    Note that the role is full trust, and as I mentioned this in in production on the Azure servers, NOT in debug.  The worker role itself does some dynamic compilation, for which it needs to start a new AppDomain.  It appears that the exception is
    coming from the spawned AppDomain when it occurs.  The exception itself is triggered on a simple Trace.TraceInformation call.
    What could cause this?
    What can we do to recover from this?

    We are getting this exception after a worker role has been operating fine in production for several weeks.  Once this exception starts getting reported, it will keep getting it every time the worker role tries to access anything with the Diagnostics:
    Not running in a hosted service or the Development Fabric
    Note that the role is full trust, and as I mentioned this in in production on the Azure servers, NOT in debug.  The worker role itself does some dynamic compilation, for which it needs to start a new AppDomain.  It appears that the exception is
    coming from the spawned AppDomain when it occurs.  The exception itself is triggered on a simple Trace.TraceInformation call.
    What could cause this?
    What can we do to recover from this?
    Hi,
    I have tested this situation in Windows Azure platform and i can not reproduce your exception message, my test code in follwoing MSDN samples and i deploy it in Production status.
    The MSDN article (include Appdomain code snippets)
    http://msdn.microsoft.com/en-us/library/system.appdomain.aspx .
    Base on my understand, the "Not running in a hosted service or the Development Fabric" error message occur when Azure Emulator or Azure development fabirc, because you create a new appdomain in WorkRole, and it may cause permission errors, a similar
    posts by my research:
    https://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/50987285-58ac-484e-b604-725fe01a3325
    If you still have some problems, please inform me. Thank you.
    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact
    [email protected]
    Microsoft One Code Framework

  • Azure worker role throws after EF/Odata Nuget upgrades

    Have an Azure project with web and worker roles. Recently upgraded all nuget packages (EF went from 6.0 to 6.1 among other things). The web role seems to be fine The worker roles is not able to do much. Keep getting various exceptions coming from framework
    code:
    An exception of type 'System.ArgumentException' occurred in mscorlib.dll and wasn't handled before a managed/native boundary
    Additional information: Duplicate type name within an assembly.
    An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in EntityFramework.SqlServer.dll
    A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in EntityFramework.dll
    Role instance status check succeeded: Ready A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in EntityFramework.SqlServer.dll Microsoft.WindowsAzure.ServiceRuntime Critical: 1 : Unhandled Exception: System.Reflection.TargetInvocationException:
    Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Duplicate type name within an assembly.   at System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType)  
    at System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType)   at System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module,
    PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType)   at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder()  
    at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder, ClrEntityType ospaceEntityType,
    MetadataWorkspace workspace)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospaceEntityType, MetadataWorkspace workspace)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType
    ospaceEntityType, MetadataWorkspace workspace)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap, TranslatorArg arg)   at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2
    visitor, TArgType arg)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg, ColumnMap discriminatorColumnMap, Object discriminatorValue)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap, TranslatorArg arg)
       at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2 visitor, TArgType arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap[T](ColumnMap
    columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
    arguments, Signature sig, Boolean constructor)   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
    Binder binder, Object[] parameters, CultureInfo culture)   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(Translator translator,
    Type elementType, ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext
    context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable1 compiledQueryParameters, AliasGenerator aliasGenerator)
       at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable1 forMergeOption)   at System.Data.Entity.Core.Objects.ObjectQuery1.<>c__DisplayClass7.<GetResults>b__6()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)   at System.Data.Entity.Core.Objects.ObjectQuery1.<>c__DisplayClass7.<GetResults>b__5()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func1 operation)   at System.Data.Entity.Core.Objects.ObjectQuery1.GetResults(Nullable1 forMergeOption)   at System.Data.Entity.Core.Objects.ObjectQuery1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       at System.Data.Entity.Internal.LazyEnumerator1.MoveNext()   at System.Linq.Enumerable.Count[TSource](IEnumerable1 source)
       at Microsoft.Retail.Cloud.MediaProcessing.ProcessNewItems() in c:\TFS\Trunk\Cloud\Cloud.Processing\Services\MediaProcessing.cs:line 39
       at Microsoft.Retail.Cloud.Process.AssetGatherer.Run() in c:\TFS\Trunk\Cloud\Cloud.Processing\AssetGatherer.cs:line 46
       at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
       at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole()
       at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<StartRole>b__2()
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    A first chance exception of type 'System.ArgumentException' occurred in System.dll
    System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled
    exception</Description><AppDomain>RdRuntime</AppDomain><Exception><ExceptionType>System.Reflection.TargetInvocationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Exception
    has been thrown by the target of an invocation.</Message><StackTrace>   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(Translator translator, Type elementType, ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming,
    Boolean valueLayer)
       at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable1 compiledQueryParameters,
    AliasGenerator aliasGenerator)   at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable1 forMergeOption)
       at System.Data.Entity.Core.Objects.ObjectQuery1.&lt;&gt;c_DisplayClass7.&lt;GetResults&gt;b_6()   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy
    executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       at System.Data.Entity.Core.Objects.ObjectQuery1.&lt;&gt;c_DisplayClass7.&lt;GetResults&gt;b_5()   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func1 operation)
       at System.Data.Entity.Core.Objects.ObjectQuery1.GetResults(Nullable1 forMergeOption)
       at System.Data.Entity.Core.Objects.ObjectQuery1.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator&gt;b_0()   at System.Data.Entity.Internal.LazyEnumerator1.MoveNext()
       at System.Linq.Enumerable.Count[TSource](IEnumerable1 source)   at Microsoft.Retail.Cloud.MediaProcessing.ProcessNewItems() in c:\TFS\Trunk\Cloud\Cloud.Processing\Services\MediaProcessing.cs:line 39   at Microsoft.Retail.Cloud.Process.AssetGatherer.Run()
    in c:\TFS\Trunk\Cloud\Cloud.Processing\AssetGatherer.cs:line 46   at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()   at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole()   at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.&lt;StartRole&gt;b_2()  
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback,
    Object state, Boolean preserveSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   at System.Threading.ThreadHelper.ThreadStart()System.Reflection.TargetInvocationException:
    Exception has been thrown by the target of an invocation. ---&gt; System.ArgumentException: Duplicate type name within an assembly.   at System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType)  
    at System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType)   at System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module,
    PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType)   at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder()  
    at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder, ClrEntityType ospaceEntityType,
    MetadataWorkspace workspace)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospaceEntityType, MetadataWorkspace workspace)   at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType
    ospaceEntityType, MetadataWorkspace workspace)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap, TranslatorArg arg)   at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2
    visitor, TArgType arg)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg, ColumnMap discriminatorColumnMap, Object discriminatorValue)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg arg)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap, TranslatorArg arg)
       at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2 visitor, TArgType arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap[T](ColumnMap
    columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
    arguments, Signature sig, Boolean constructor)   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
    Binder binder, Object[] parameters, CultureInfo culture)   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap(Translator translator,
    Type elementType, ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext
    context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable1 compiledQueryParameters, AliasGenerator aliasGenerator)
       at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable1 forMergeOption)   at System.Data.Entity.Core.Objects.ObjectQuery1.&amp;lt;&amp;gt;c__DisplayClass7.&amp;lt;GetResults&amp;gt;b__6()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)   at System.Data.Entity.Core.Objects.ObjectQuery1.&amp;lt;&amp;gt;c__DisplayClass7.&amp;lt;GetResults&amp;gt;b__5()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func1 operation)   at System.Data.Entity.Core.Objects.ObjectQuery1.GetResults(Nullable1 forMergeOption)   at System.Data.Entity.Core.Objects.ObjectQuery1.&amp;lt;System.Collections.Generic.IEnumerable&amp;lt;T&amp;gt;.GetEnumerator&amp;gt;b__0()
       at System.Data.Entity.Internal.LazyEnumerator1.MoveNext()   at System.Linq.Enumerable.Count[TSource](IEnumerable1 source)
       at Microsoft.Retail.Cloud.MediaProcessing.ProcessNewItems() in c:\TFS\Trunk\Cloud\Cloud.Processing\Services\MediaProcessing.cs:line 39
       at Microsoft.Retail.Cloud.Process.AssetGatherer.Run() in c:\TFS\Trunk\Cloud\Cloud.Processing\AssetGatherer.cs:line 46
       at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
       at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole()
       at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.&amp;lt;StartRole&amp;gt;b__2()
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()</ExceptionString><InnerException><ExceptionType>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Duplicate
    type name within an assembly.</Message><StackTrace>   at System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType)
       at System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType)
       at System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType)
       at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder()
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder, ClrEntityType ospaceEntityType, MetadataWorkspace workspace)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospaceEntityType, MetadataWorkspace workspace)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType ospaceEntityType, MetadataWorkspace workspace)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap, TranslatorArg arg)
       at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2 visitor, TArgType arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap
    columnMap, TranslatorArg arg, ColumnMap discriminatorColumnMap, Object discriminatorValue)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg
    arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap, TranslatorArg arg)   at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2
    visitor, TArgType arg)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap[T](ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)</StackTrace><ExceptionString>System.ArgumentException:
    Duplicate type name within an assembly.
       at System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType)
       at System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType)
       at System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType)
       at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.get_TypeBuilder()
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.ProxyTypeBuilder.CreateType(ModuleBuilder moduleBuilder)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.BuildType(ModuleBuilder moduleBuilder, ClrEntityType ospaceEntityType, MetadataWorkspace workspace)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.TryCreateProxyType(EntityType ospaceEntityType, MetadataWorkspace workspace)
       at System.Data.Entity.Core.Objects.Internal.EntityProxyFactory.GetProxyType(ClrEntityType ospaceEntityType, MetadataWorkspace workspace)
       at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(EntityColumnMap columnMap, TranslatorArg arg)
       at System.Data.Entity.Core.Query.InternalTrees.EntityColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults2 visitor, TArgType arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap
    columnMap, TranslatorArg arg, ColumnMap discriminatorColumnMap, Object discriminatorValue)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.ProcessCollectionColumnMap(CollectionColumnMap columnMap, TranslatorArg
    arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslatorVisitor.Visit(SimpleCollectionColumnMap columnMap, TranslatorArg arg)   at System.Data.Entity.Core.Query.InternalTrees.SimpleCollectionColumnMap.Accept[TResultType,TArgType](ColumnMapVisitorWithResults`2
    visitor, TArgType arg)   at System.Data.Entity.Core.Common.Internal.Materialization.Translator.TranslateColumnMap[T](ColumnMap columnMap, MetadataWorkspace workspace, SpanIndex spanIndex, MergeOption mergeOption, Boolean streaming, Boolean valueLayer)

    hi,
    I will mark this thread as answer,if you find it no help,please fell free to unmark.
    Thanks!
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • MPN Manufacturer batch determination during goods issue

    I am from pharma industry and my business runs with batch management, MPN features. Scenario: I have 3 different finished product P1, P2 and P3. All three finished products use raw material R1. But, I have restrcition like, when I am manufacturing P1

  • EOY2007 GB (E-Filing)

    Team,        We have to start E-Filing.Can you please tell me how to proceed the E-filing or is there any document available for that. ponits sure for the Answers Regards Priya.k

  • Event only works once

    Hi all!    I'm trying to do a movieclip that has 2 buttons that change the content of a flvplayer.    The problem is that the buttons only work once, after that the event listener isn't triggered (I think) I have no removeEventListener in my code for

  • I am unable to open my iMovie HD project in Final Cut Express

    I am unable to open my iMovie HD project in Final Cut Express. All I get are error messages, no matter what I try. Tried everything, please help! Thank you         

  • JSF and JDBC

    Hi, I am new to JSF, can anybody direct me to a good tutorial on JSF and JDBC (Oracle)? Thanks