none
To use remote App.config file fails in Windows 8 RRS feed

  • Question

  • I want to read app.config from the remote server on my NET 3.5 application.

    For example, I'm updating "APP_CONFIG_FILE" to set remote app config like the below code.

    It works fine on Windows 7 or previous windows version.

    But on windows 8, the program is being in no-response stage(like kind of deadlock) when calling ConfigurationManager.AppSettings. There is no error message here and I have to kill the process manually by using Task manager.

    I'll appreciate for any suggestion or comment.

        static class Program
        {
            [STAThread]
            static void Main()
            {
                AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "http://xxxx/app.exe.config");
                MessageBox.Show(ConfigurationManager.AppSettings["HelpFile"]);
               
            }
        }
    Thanks






    Tuesday, March 31, 2015 5:44 AM

Answers

All replies

  • Hello,

    Could it possible that the problem is pending on some settings of that Win 8 OS? Do you have any other Win 8 OS which can reproduce this issue? Maybe the problem is due to some security settings on your environment.

    Best regards,



    Barry
    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.

    Tuesday, March 31, 2015 7:08 AM
  • I can reproduce this issue on a Windows 8 machine and windows 2012 server. But it works fine on windows 7 and windows 2008 server. Maybe it's related with a security setting but I couldn't figure out what causes it.

    Thanks for the comment.

    Tuesday, March 31, 2015 1:22 PM
  • @momo898,

    I just saw .NET 3.5 on your first reply and I remember that Win 8 and Win Server 2012 .NET 3.5 are not enabled by default. Have you checked this?

    Best regards,



    Barry
    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.

    Thursday, April 2, 2015 1:45 AM
  • @Barry

    Yes Net3.5(and NET2.0) was installed to my machines.

    Thanks

    Thursday, April 2, 2015 5:33 AM
  • Hello momo898,

    >> But on windows 8, the program is being in no-response stage(like kind of deadlock) when calling

    I suggest that you could follow this blog below to find the detail caused reason:

    http://blogs.msdn.com/b/tess/archive/2006/10/16/net-hang-debugging-walkthrough.aspx

    Regards.


    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.

    Tuesday, April 7, 2015 5:55 AM
    Moderator
  • Thank for the suggestion.

    I think it is a thread locking issue and it might be a bug on the latest build of NET3.5/2.0 rather than windows OS.

    I tested it for various machines.

    1. windows 7 (with NET 2.0.50727.5483)  => Works Fine!

    2. window 8 (with NET 2.0.59527.6387 or 2.0.59527.6419) => Works Fine!

    3. window 8.1 (with NET 2.0.50727.7905) => Fail!

    4. windows 2012 (with 2.0.50527.8007) => Fail!

    I will try/test it at windows 8.1 with old Net 2.0 version.

    Thanks

    Thursday, April 9, 2015 9:31 PM
  • Hello momo898,

    If it is an not reported issue in .NET, you could post this feedback to:

    https://connect.microsoft.com/VisualStudio

    Regards.


    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.

    Thursday, April 16, 2015 1:34 AM
    Moderator
  • Finally I resolved the issue after contacting Microsoft Technical support.

    Actually it's a known bug on NET 3.5 (windows 8.1 / windows 2012) and hotfix is already available.

    http://support.microsoft.com/en-us/kb/2926995

    After installing the hotfix, the issue was resolved.

    • Marked as answer by momo898 Thursday, June 18, 2015 10:38 PM
    Thursday, June 18, 2015 10:37 PM