Error installing .NET Framework on Windows XP SP2 caused by Data Execution Prevention (DEP)


Note – the issue described in this blog post was originally presented as an issue on Windows XP SP2.  However, it can also affect .NET Framework 1.0 and 1.1 installation on any OS released after the .NET Framework 1.0 and 1.1 shipped – specifically, I have seen reports of this issue on Windows Vista.  The steps listed here are applicable to this type of install failure on other newer OS’s like Windows Vista and not just Windows XP SP2. 


As I was researching the bug in .NET Framework 1.0 and 1.1 that is related to regional language settings on Windows XP SP2 (see this blog post for full details), I discovered an additional issue introduced in Windows XP SP2 that can cause .NET Framework 1.0 or 1.1 setup to fail.  Just like the other bugs, this one causes .NET Framework setup to report an error while registering System.EnterpriseServices.dll.  In the case of .NET Framework service pack setup, it will cause an error to occur while extracting the service pack to a temporary location before even starting setup.


Windows XP SP2 introduced a new security feature known as Data Execution Prevention (or DEP for short).  There is a good article introducing DEP here.  If a computer running XP SP2 has hardware that supports DEP and DEP is enabled in boot.ini, installation of the .NET Framework will fail while trying to register System.EnterpriseServices.dll (which happens to be the first time that managed code gets run during setup and therefore is the first time the bug is hit).  Also, installation of .NET Framework service packs will fail while trying to extract the service pack setup to a temporary location because the .NET Framework service pack wrapper is written in managed code.


The DEP feature was introduced after the .NET Framework 1.0 and 1.1 shipped and unfortunately the .NET Framework is not compatible with DEP without applying a service pack.  Like the language settings bug, this DEP compatibility bug has been fixed in the .NET Framework 1.0 SP3 and 1.1 SP1.  However, this bug causes the initial installation of the .NET Framework to fail and rollback, and you cannot install the service pack without first getting the product installed (unless you use a method like I describe here, which will work but is not “officially” supported).


If you are running into this bug on your Windows Vista, Windows Server 2008 or Windows 7 computer, you can use steps like the ones in this blog post to work around this bug in the .NET Framework 1.0 and 1.1 and get it installed. 


If you are running into this bug on your Windows XP SP2 computer, you can use the following steps to work around this bug in the .NET Framework 1.0 and 1.1 and get it installed:



  1. From the Start menu, type sysdm.cpl in the Run box or go to Control Panel and choose the System item

  2. Click the Advanced tab

  3. Click the Settings button in the Startup and Recovery section of this tab

  4. In the Default operating system dropdown, select each option that starts with “Microsoft Windows XP Professional” and change /NoExecute=Optin to /NoExecute=AlwaysOff.  This will update the settings in boot.ini on the computer

  5. Click OK

  6. Restart

  7. Install the .NET Framework 1.0 or 1.1

  8. Install .NET Framework 1.0 SP3 or 1.1 SP1

  9. Return to the System control panel, select each option that starts with “Microsoft Windows XP Professional” and change /NoExecute=AlwaysOff back to /NoExecute=Optin

For reference, here is what the Startup and Recovery item in the Advanced tab of the System control panel looks like (this is the screen you will see in step 4 of the instructions above):


System control panel Advanced tab


<update date=”4/17/2008″> Added a note indicating that the issue in this post can affect the .NET Framework 1.0 and 1.1 setup on Windows Vista and not just Windows XP SP2 </update>


<update date=”6/23/2009″> Fixed broken image link, and added a link to a separate blog post that provides steps for turning DEP on and off on Windows Vista and higher. </update>


 

Comments (39)

  1. Jimmy Neutron says:

    Interesting! I had problems because I (stupidly) installed a VS Studio 2005 beta on my machine, which I’ve since taken off. I uninstalled 1.1 framework and tried to reinstall. I couldn’t do it. I tried this solution and it worked! But now I can’t install the 1.1 SP 1.

  2. Hi Jimmy – I saw your comment on my other blog post, and I’m going to duplicate the response here in case you don’t check the other location. I’m sorry you’re still having trouble getting .NET Framework 1.1 SP1 to install correctly. Could you send me the exact error message you are receiving so I could research this further? Also, you may want to check out the troubleshooting guide I previously published for resolving some .NET 1.1 SP1 errors. You can find it at http://blogs.msdn.com/astebner/archive/2004/11/23/268934.aspx

  3. Jimmy Neutron says:

    Thanks, I didn’t bookmark the other post but I did this one.

    Got it fixed. Fortunately, Windows Update is one "product" that mere mortals can get technical support for without selling a firstborn into slavery. I submitted an incident to them and got instructions on how to finish the job that the .NET Framework uninstaller won’t do. And that apparently goes for 1.1 and 2.0 Geez, how hard is it to keep track of what files and registry entries a program (even something as big as the .NET framework) creates and clean them up properly? Is that too much to ask?

    Now Office 2003 sp1 won’t install but I have a separate incident for that and I imagine that I will get a new set of instructions for cleaning that up. Why installing and uninstalling the .NET framework should cause problems for Office is another inponderable mystery of the universe.

    Excuse all the sarcasm. But it really hurts to lose a day doing this stuff.

  4. Hi Jimmy – I hope you still have this post bookmarked and are reading the comments. If you don’t mind, could you share the solution that allowed you to install .NET 1.1 SP1 so that others might benefit from your experience?

    I apologize for the pain that you’ve encountered while trying to get all of these various patches and service packs installed. It is experiences like yours that provide me motivation to continue to seek ways to improve and to blog about known issues and workarounds in our products….

  5. Jasmine says:

    I’m not sure if this is the problem I am having or not, but suddenly out of no where, and I am not even sure what prompted it I am getting a DEP error message on boot up at which point I have to click the Dont Send or Cancle button a zillion times to get my machine to actually let me on to the desk top. Do you have an ideas on how I might stop this problem?

  6. Hi Jasmine – I am not sure what could be causing this error. After you boot your system, can you run eventvwr.exe and check your Application and System event logs to see if you have any errors or warnings there that might lead to the root cause?

    Hope this helps….

  7. ilyass says:

    je veux telecharger le windows xp ps2

  8. I got an email from the .NET Framework setup technical support team today with some more information…

  9. peter lynch says:

    hi,

    im trying to install .net framework 1.1 but kept getting errors so I tried what you said babove yet kept getting the same error. It was a really long error so i print screened it and hosted it on imageshack, this is the address ;

    http://img77.imageshack.us/img77/6138/netorror8xs.jpg

    Any help would be much appreciated.

    Thank you

    Peter

  10. peter lynch says:

    hi,

    im trying to install .net framework 1.1 but kept getting errors so I tried what you said babove yet kept getting the same error. It was a really long error so i print screened it and hosted it on imageshack, this is the address ;

    http://img77.imageshack.us/img77/6138/netorror8xs.jpg

    Any help would be much appreciated.

    Thank you

    Peter

  11. Hi Peter – The error you are seeing means "function not defined in specified DLL."  Can you please try the steps listed at http://blogs.msdn.com/astebner/archive/2005/10/11/479928.aspx and see if that helps resolve this issue on your system?

  12. peter lynch says:

    Thanks, that fixed it perfectly!!

    great guy!

  13. Dino says:

    The above worked for me on Windows Server 2003 x64 running on an Opteron. Although my boot.ini file had /NoExecute=Optout . I changed it to AlwaysOff and the bugger finally installed. I am guessing that I need to install .net 1.1 SP1 and then I can change the NoExecute back to OptOut?

    Thanks,

    Dino

  14. Hi Dino – You are correct that you will need to set /NoExecute=AlwaysOff, then install the .NET Framework 1.1 SP1, then you can set it back to /NoExecute=OptOut.  There is a fix in .NET 1.1 SP1 that allows it to correctly handle NoExecute scenarios.

  15. Dino says:

    Aaron,

    THANKS!!! This saved me additional stress. I had been working on this server for the better part of the day, and couldn’t find anything on TechNet or the newsgroups.

    Dino

  16. livestrong says:

    I have tried all the suggested fixes here and continue to have the same problem.  Please let me know how I can find my error file and possibly let you look at it.

  17. Hi Livestrong – I have posted some other suggestions to try to workaround errors related to System.EnterpriseServices.dll at http://blogs.msdn.com/astebner/archive/2006/05/17/600677.aspx.  I would suggest trying those workarounds as well if you haven’t yet.

    If none of those work, your best option is to contact Microsoft technical support.  You are entitled to a free support case for setup-related issues such as this.

  18. livestrong says:

    Hi Astebner,

    Can you pls look at this file

    http://www.financialblessings.info/framework_error.htm  I tried your above workaround and it did not work.  Same error symptom.  Maybe if you look at this MSI*.log file, something will jump out at you??  I am hoping so..

    thanks in advance

    Livestrong

  19. Hi Livestrong – The error log shows that the following is causing your setup to fail:

    CA_ComregEnterpriseServices.3643236F_FC70_11D3_A536_0090278A1BB8: Executing: ERROR: Process returned non-0 value! CMDLINE: "C:WINDOWSMicrosoft.NETFrameworkv1.1.4322RegSvcs.exe" /bootstrapi

    Just to confirm, did you try all of the different suggestions listed at http://blogs.msdn.com/astebner/archive/2006/05/17/600677.aspx?  Or did you only try the one listed in this current blog post?  I cannot tell for sure what you mean when you said you tried my above workaround.  Hopefully one of the other workarounds listed in that other blog post will help here.

    If none of those help, your best option now is to contact Microsoft technical support.  They will be able to provide more detailed troubleshooting suggestions.  You are entitled to a free support case for setup-related issues such as this.  If you find that the other workarounds do not help and you need help getting a hold of them, please contact me using http://blogs.msdn.com/astebner/contact.aspx and I can help you create a support case.

  20. livestrong says:

    HI,

    Yes, I did add the MSI break, did the optin to alwaysoff, checked the language settings, used the uninstall tool msicuu2.exe, deleting version file under microsoft.netFrameworkvxxx,

  21. Hi Livestrong – Since none of those workarounds helped, your best option now is to contact Microsoft technical support.  They will be able to provide more detailed troubleshooting suggestions.  You are entitled to a free support case for setup-related issues such as this.  If you need help getting a hold of them, please contact me using http://blogs.msdn.com/astebner/contact.aspx and I can help you create a support case.

  22. I got an email from the .NET Framework setup technical support team today with some more information

  23. A while ago, I described a .NET Framework 1.0 and 1.1 installation failure that can be caused by the

  24. A little while back, I wrote a blog post describing an interaction issue between Visual Studio setup

  25. Details about the .NET Framework 2.0 setup packaging Available command line switches for .NET Framework

  26. Nate says:

    I'm not sure if this post is still checked but I thought I'd give it a try. I was able to install .NET 1.1 by changing /noexecute to alwaysoff, yet when I do the same thing and try to install .NET 1.1 SP1 I get an error that says "This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Install patch package." Any idea how I can get around this? I haven't been able to find any help.

  27. Hi Nate – The error you're seeing from the .NET Framework 1.1 SP1 means that it isn't even able to open the patch to start trying to install it.  I'm not sure what would cause that type of error.  It might help to try to re-download the setup package in case something got corrupted during the original download.  You can also try to download the copy of 1.1 SP1 that I have at cid-27e6a35d1a492af7.office.live.com/…/netfx11sp1.msp.

  28. Nate says:

    the link you provided seems to work but I have one more question before I install it. There was a Microsoft Support article (that I can't seem to find now for reference) that linked to the cleanup utility. In the article it said to install the frameworks in the order: 3.5, 1.1, 1.1 SP1 and I believe it said to not install any further updates for them until those 3 were installed first. Since I was having trouble with 1.1 SP1, I had already updated the others so I was wondering do I need to use the cleanup utility again to remove the 2 i have installed and then re-install all 3 over again? Thank you for the help.

  29. Hi Nate – When users run into errors installing the .NET Framework, I typically suggest installing in reverse order (newest first, then oldest) like this article does.  The reason for that is that there are fixes in the newer versions of the .NET Framework that can help the older versions install correctly if they were previously failing.  It doesn't hurt to install updates for the other versions of the .NET Framework first.

    If you've already installed the .NET Framework 3.5 SP1 and the .NET Framework 1.1 and are still having trouble installing the .NET Framework 1.1 SP1, then I may be able to help further.  Can you please tell me more details about the errors you are seeing during 1.1 SP1 setup?  Also, can you please use the steps listed at blogs.msdn.com/…/help-me-help-you-if-you-have-setup-bugs.aspx to gather a verbose log from the failing 1.1 SP1 setup, upload the log to a file server such as http://skydrive.live.com, and reply back here with a link I can use to download the log and take a look?

  30. Nate says:

    The installer in the link you provided doesn't give me the problem that I reported in my first comment, but I'm now getting the following error: "The feature you are trying to use is on a network resource that is unavailable." Below this it says: "Click OK to try again, or enter an alternate path to a folder containing the installation package 'netfx.msi' in the box below." I clicked Cancel since I don't know the location (also tried using Search) and I get: "Error 1706.No valid source could be found for product Microsoft .NET Framework 1.1. The Windows installer cannot continue."

    Here is the log file you asked for: http://www.mediafire.com

    I wanted to mention that I've tried running the installer while having the Distributed Transaction Coordinator startup type set to "Disabled" and having the boot.ini file set as "/NoExecute=AlwaysOff" at the same time because this is the way I had it when I installed 1.1 (although I'm not sure that I needed them both simultaneously). I've alaso tried running the installer while having the Distributed Transaction Coordinator startup type set to "Manual" as it originally was and having the boot.ini file set as "NoExecute=OptIn". When I receive your reply and proceed the next time I try to install it, how should I have these settings?

    Thank you

  31. Hi Nate – The error about no valid source is not caused by the distributed transaction coordinator or the NoExecute settings.  That error typically means that the product was previously installed but it has gotten corrupted somehow.  What I usually suggest trying to do for that type of error is to fully remove all versions of the .NET Framework from your system by using the steps listed at blogs.msdn.com/…/8108332.aspx, then re-install the .NET Framework 3.5 SP1, then the .NET Framework 1.1, then 1.1 SP1.

    Hopefully this helps!

  32. Nate says:

    Sorry for the late response, I recently got back from a vacation with my family. I followed the steps in the link you provided and it worked. It seems to be the same thing that I had done before, so I may have made a mistake last time. I'm currently on step 7, the one that instructs me to download any service packs and/or hotfixes for the .NET framework versions I installed.

    Since I had only downloaded an installed the versions you said (3.5 SP1, 1.1, and 1.1 SP1,) is there any need to download and install 1.0 SP3? 1.1 SP1 is also listed, but I'm guessing I'm to skip that since I've already installed it. And the 3.5 SP1 family update is the one that I DO need to install, correct? Sorry, I just really want to make sure I've covered everything.

    Finally, once you respond and I install any of those service packs/hotfixes, would it be fine to proceed with any further updates through Windows Update?

    Thank you very much for the help, I greatly appreciate it.

  33. Hi Nate – If you already have 1.1 SP1, you should be able to skip installing it again.  If you have 1.0 installed, then I'd suggest installing 1.0 SP3 as well so that you'll have the latest updates.  However, if you don't have 1.0 installed, then you can probably skip that because nearly all applications will automatically use more recent versions of the .NET Framework instead of 1.0 if they are available.  You can see more information about whether or not you need to install older versions of the .NET Framework if you already have newer versions installed in the blog post at blogs.msdn.com/…/9557946.aspx.

    Yes, it should be fine to proceed with other Windows Updates once you've gotten the .NET Framework versions installed on your system.  Please let me know if you run into any further issues.

  34. Margot Alnwick says:

    Thank you for all your information and your NET clean up tool.  I have now successfully installed all versions and updates.

    My question is:  I have turned the DEP off, do I need to turn it on again or just leave it disabled?

    Thank you

  35. Hi Margot Alnwick – In general, I'd suggest changing that DEP setting back to the default value after you've gotten the .NET Framework to install successfully.

  36. Margot Alnwick says:

    Thanks again for all your great information and help.

    Take care.

  37. Dj Mosh says:

    Hi Margot Alnwick

    i am unable to install .NET Framework the error i am getting is this : you must install the 32 bit windown imaging component(WIC) before you run Setup,Please visit the Micorosoft Download Center to install WIC and then return Setup

    but when i tried to download from that xp that installation is also giving me an error, please help me out.

  38. Hi Dj Mosh – Can you please use the tool described at blogs.msdn.com/…/6458047.aspx to collect all of your setup log files, upload the file named %temp%vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?