Skip to main content



No record found.

Dynamics 365 Community / Forums / Finance forum / IIS reset difference o...
Finance forum

IIS reset difference on Local OneBox and Azure VM

Posted on by 3,538

I recently started working on VM's deployed from LCS. I am used to running VM's locally on my machine. There are quite a few differences which I have dealt with, but I can't get my head around an IIS issue I will be describing.

Firstly, I know very little of IIS, server and AX architecture. It is something I should tackle soon. Nonetheless I currently know almost nothing - so I'm sure my question will seem confusing. I can only explain what I experience and what I'm trying to accomplish. And I can't google it because I don't know what to google.

I simply want to do an iisreset.

I am used to doing the following (on local VM's):

  • Open cmd as admin - simply type iisreset              OR
  • Open Internet Information Services (IIS) Manager and click Restart on the AOSService node.

Now on an Azure VM that does not work.

  • The cmd issreset command looks like it works, but it doesn't. For example if I keep the front end open I never get prompted with "We've lost your connection, click close to continue working". And I'm working with data entities and OData, so my data entity modifications do not show after iisreset.
  • In the Internet Information Services (IIS) Manager the AOSService node is allways in stopped mode. And if I try to start it, it displays the following error:


My question is simply: How do I do an iisreset on an Azure VM?

Thanks for reading

  • Pete Alberts Profile Picture
    Pete Alberts 3,538 on at
    RE: IIS reset difference on Local OneBox and Azure VM

    Thanks Andre

    There are no errors. I do not develop errors ;)


    I realize now what I actually wanted to ask. And you wanted to know why I wanted to do an iisreset. There is no short explanation - I typed it out in the last section.


    That is very helpful. I read Ievgen's blog post and granted it a well deserved "like". I also read the original thread and noticed that some other issue I have been facing are described there by Joris.

    If you want to know what happened

    The story goes like this. 

    1. I like developing on a local machine - I have the hardware available here and there's some lag all the way to France.
    2. I am busy with a massive integration. Test calls need to be made, thus I set up an environment on LCS (to which I periodically push my dev changes) so that the client can call and test my endpoints. So I am working on my local VM and then update the cloud VM after I reach some kind of checkpoint.
    3. Some of my endpoints requires an email/s to be sent. So to prove to the client that the dev works, I needed to get the email sending functionality thing in AX working. My technical colleague/friend here said something about smtp server setup and directed me to the following link (he will be receiving some hate mail after the turmoil he has put me through).
    4. After I successfully completed the stuff in the video and some other setup on SysEmailParameters, the test emails started going through (on my local VM). I incorrectly made the assumption that the smtp relay setup I did was the reason for being able to send emails.
    5. Then I wanted to do the same thing on the cloud VM. I did the exact same things but without success. As the SMTP Virtual Server node I created from the above mentioned link resides in IIS 6.0, my first assumption was that my email setup was not working because of earlier mentioned fact that the IIS AOSService node is always in a stopped state. And the tutorial requires me to run an iisreset in powershell. From the process on the local VM, I knew that I needed the iisreset to make the thing work. So I assumed that iisreset was not working.
    6. Couldn't figure out how to get the normal IIS going and I wasn't sure if iisreset was working, so I posted here on the forum.
    7. Thank you Nikolaos and Sukrut for making me aware of the IIS Express thing.
    8. After I got the normal IIS going again I could be sure that it was not the reason my mails weren't working.
    9. Realized that sending a mail requires no setup. You just need to specify the correct parameters on the form. I had this link open all the time: but I was sure it was assuming the "smtp server/relay setup" part was assumed. I mean if the experienced technical guy says so, then you listen.
    10. The reason the mails weren't working on the cloud VM was because the Admin user's email was empty (or invalid - can't remember). And I later realized that the form needs to be reloaded for the values to take effect. I haven't taken the time to see why this happens, I assume it is something to do with the table being a parameter.

    I have learned how to quickly set up email in AX - developers here in my organization are under the impression it is a massive setup. So this wasn't in vain.

    I did not have the time to type this story shorter - I've spent enough time on this.

    Thank you

  • Verified answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,643 Moderator on at
    RE: IIS reset difference on Local OneBox and Azure VM

    Wherever I deploy any machine , first step I do is change config file(DynamicsDevConfig.xml)  so that I work with IIS always .  Initially IISexpress has issues  and  you had to do some workarounds like opening table browser to start it or use button from D365 menu etc..   How you can do this is explained on below link and so far I never faced any issues and you don't have to think about iisexpress.

    Regarding your issues with entities ,  build and sync should solve your all issue.  Try changing config to IIS , restart server and then do you activities and see if it makes any difference.

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: IIS reset difference on Local OneBox and Azure VM

    Like I wrote, the site might be running on iisexpress instead of IIS.

    When working with the entities I'd say you normally need to perform a database sync after changes. Not sure if OData actions require that before the metadata gets refreshed. But for any new fields you definetely need to sync. Did you try that? Anyway it's off topic since this question was about iisreset.

    Anyway, if the system is not running on IIS in this case, then it doesn't matter whether you are able to run iisreset or not. And then we are back in the question about the actual requirement :)

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 288,459 Super User on at
    RE: IIS reset difference on Local OneBox and Azure VM

    Hi Pete,

    Please check if next to the build also a database sync is performed. If not, that could cause your errors initially. If the build is not resetting the web application (IIS) then there might be a build error. Can you confirm that there are no errors during a build?

  • Pete Alberts Profile Picture
    Pete Alberts 3,538 on at
    RE: IIS reset difference on Local OneBox and Azure VM

    Thanks Nikolaos

    Type of machine

    I can't answer that, but I can tell you where I get it from: -> click on project -> cloud hosted environments. So I guess it's a cloud hosted environment :)

    Admin access

    I have admin permissions (I created the machine).

    "... normally it still uses IIS"

    That is something that I do not understand. As I mentioned the IIS is always in a stopped state.


    None of the nodes are running in the screenshot above. Then how is it possible that I can still open the front end?

    It confuses me a lot... For example on my local VM, if I stop AOSService or that root node (the computer name one), I won't be able to browse the front end:


    IIS is reset every time you build in VS

    I've come across that fact/statement a few times, including some experienced colleagues of mine. But I will respectfully say it is incorrect  :) You can test it:

    1. Create an OData action on some entity and build
    2. Call the method from postman or whatever tool you prefer. Then you'll get an enormous error stack trace.
    3. iisreset. Then it works fine.

    Or you can just add a field or change some property that will show from an OData call.

    Nonetheless, this part is a bit of topic.

    The reason I want to iisreset

    It is a bit too vaguely related to this topic. I hope you don't mind me leaving that out for the time being.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: IIS reset difference on Local OneBox and Azure VM

    By Azure hosted do you mean a machine hosted in your Azure subscription (Cloud hosted environment) or hosted by Microsoft (Tier 1 Sandbox)?

    In the MS hosted environment you don't have admin access and perhaps can't restart IIS.

    Also both Azure hosted environment types use iisexpress instead of IIS when you do debugging (but if you run the application normally it still uses IIS).

    But the actual question is, what exactly are you trying to achieve with iisreset? Maybe it's not the right tool for your requirement in this case. But you didn't tell what is your actual requirement.

    Anyway every time you build in VS, the D365FO application is reset so you don't need to do any additional resets yourself. So maybe your data entity problem has some other reason and other solution.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans