win2k3 sp1 causes System.Net.WebClient.OpenRead to throw WebExcept

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ptass

    win2k3 sp1 causes System.Net.WebClient.OpenRead to throw WebExcept

    Hi

    I've installed win2k3 sp1 on a machine where an openRead on any given file
    was previously working. After installation, I get a webException as follows...

    ..message "An exception occurred during a webclient request"
    .._Hresult = "-2146233079"
    .._COMPlusExcep tionCode ="-532459699"

    Sorry I don't have the whole error, but this seems to be the only pertinent
    info it contained.

    If I remove the service pack, the problem goes away.

    The request doesn't show up in the IIS logs, nor is it seen by a http proxy
    such as fiddler.

    Is this something to do with the changed com+ security with sp1 ? and if so,
    how would I turn this off ?

    If there is a better place to post this question, then please let me know
    where.

    Thanks in advance for any help.

  • Kevin Yu [MSFT]

    #2
    RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebExcept

    Hi

    We have reviewed this issue and are currently researching on it. We will
    update you ASAP. Thanks for your patience!

    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."

    Comment

    • Kevin Yu [MSFT]

      #3
      RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebExcept

      Hi,

      I would like to confirm if the Windows 2003 is working on the server or
      client? Do you mean that the Service Pack 1 was applied to the server side,
      so OpenRead from the client stopped working?

      If so, is that reproed if you change to another server also with SP1
      applied? It would be helpful if you can provide me with the whole call
      stack here. Thanks!

      Kevin Yu
      =======
      "This posting is provided "AS IS" with no warranties, and confers no
      rights."

      Comment

      • ptass

        #4
        RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

        Hi Kevin

        Sorry for the delay in getting back to you.

        I have win2k3 on both server and client.
        I have two servers where i see the problem. One with SP1 installed, and one
        without.
        The problem seems to be with the sp1 on the client. If the client has sp1
        installed then the OpenRead produces the error. If you then uninstall sp1 on
        the client, the problem goes away.

        Hope this helps.

        Thanks for helping with this issue.



        "Kevin Yu [MSFT]" wrote:
        [color=blue]
        > Hi,
        >
        > I would like to confirm if the Windows 2003 is working on the server or
        > client? Do you mean that the Service Pack 1 was applied to the server side,
        > so OpenRead from the client stopped working?
        >
        > If so, is that reproed if you change to another server also with SP1
        > applied? It would be helpful if you can provide me with the whole call
        > stack here. Thanks!
        >
        > Kevin Yu
        > =======
        > "This posting is provided "AS IS" with no warranties, and confers no
        > rights."
        >
        >[/color]

        Comment

        • Kevin Yu [MSFT]

          #5
          RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

          Hi,

          Looking at the nature of this issue, it would require intensive
          troubleshooting which would be done quickly and effectively with direct
          assistance from a Microsoft Support Professional through Microsoft Product
          Support Services. You can contact Microsoft Product Support directly to
          discuss additional support options you may have available, by contacting us



          If this is a product issue, they will assist you free of charge. Thanks for
          your understanding.

          Kevin Yu
          =======
          "This posting is provided "AS IS" with no warranties, and confers no
          rights."

          Comment

          • ptass

            #6
            RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

            Hi again.

            I think before i take this further, i'll create a little test app that does
            nothing but an OpenRead on a file, and see if that app gets the same error
            when run on a client PC with win2k3 and sp1.

            If it works as expected, then the problem must be caused by some additional
            'thing' that my real world app is doing that the simple test app isn't doing.

            I'll post the results here anyway, just for the record.

            "Kevin Yu [MSFT]" wrote:
            [color=blue]
            > Hi,
            >
            > Looking at the nature of this issue, it would require intensive
            > troubleshooting which would be done quickly and effectively with direct
            > assistance from a Microsoft Support Professional through Microsoft Product
            > Support Services. You can contact Microsoft Product Support directly to
            > discuss additional support options you may have available, by contacting us
            >
            > http://support.microsoft.com/default...;OfferProPhone
            >
            > If this is a product issue, they will assist you free of charge. Thanks for
            > your understanding.
            >
            > Kevin Yu
            > =======
            > "This posting is provided "AS IS" with no warranties, and confers no
            > rights."
            >
            >[/color]

            Comment

            • Kevin Yu [MSFT]

              #7
              RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

              Hi,

              Yes, I agree with you. Please feel free to let me know, if your test code
              works as expected. Then we can try to analyze the other parts of the code.
              Thanks!

              Kevin Yu
              =======
              "This posting is provided "AS IS" with no warranties, and confers no
              rights."

              Comment

              • ptass

                #8
                RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

                OK, will do.

                It may take me a day or two to get to it. :-(

                I'll post the results here.

                Thanks again for you help.


                "Kevin Yu [MSFT]" wrote:
                [color=blue]
                > Hi,
                >
                > Yes, I agree with you. Please feel free to let me know, if your test code
                > works as expected. Then we can try to analyze the other parts of the code.
                > Thanks!
                >
                > Kevin Yu
                > =======
                > "This posting is provided "AS IS" with no warranties, and confers no
                > rights."
                >
                >[/color]

                Comment

                • Kevin Yu [MSFT]

                  #9
                  RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

                  You're welcome, please post to this thread after a day or two, and I will
                  follow it up.

                  Kevin Yu
                  =======
                  "This posting is provided "AS IS" with no warranties, and confers no
                  rights."

                  Comment

                  • Adrian Drumea

                    #10
                    RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

                    Hello,

                    I'm writing a small mining application in c#, and it happens to me too. I
                    have XP SP2, with all the updates. WebClient throws an
                    ArgumentOutOfRa ngeException: non-negative number required and then complains
                    about parameter count in System.IO.FileS tream.Write. It happens while using
                    WebClient.Downl oadFile.

                    Any thoughts?

                    Comment

                    • ptass

                      #11
                      RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

                      OK, I think I've gotten to the bottom of this issue.

                      I building myself a little test application.

                      using System;
                      using System.Net;
                      using System.IO;


                      namespace OpenReadTestApp
                      {
                      /// <summary>
                      /// Summary description for Class1.
                      /// </summary>
                      class Class1
                      {
                      /// <summary>
                      /// The main entry point for the application.
                      /// </summary>
                      [STAThread]
                      static void Main(string[] args)
                      {
                      try
                      {


                      System.Net.WebC lient webClient = new System.Net.WebC lient();
                      string fullName = "http://10.2.5.210/Components/Config.Default. Xml";
                      Console.WriteLi ne( "fetching stream for : "+fullName) ;
                      Stream s = webClient.OpenR ead(fullName);
                      Console.WriteLi ne( "OK" );
                      Console.ReadLin e();

                      }
                      catch( Exception e )
                      {
                      Console.WriteLi ne( e );
                      Console.ReadLin e();
                      }
                      }
                      }
                      }


                      This works fine when run from on a win2k3 client ( launching the app via
                      href ) with win2k3 sp1 or not, which i wasn't expecting.

                      My app was still throwing the following error, which suggested a problem
                      around configuration settings.

                      System.Net.WebE xception: An Exception occurred during a WebClient request.
                      --> System.NullRefe renceException : Object reference not set to an instance
                      of an object.
                      at System.Configur ation.DefaultCo nfigurationSyst em..ctor()
                      at System.Configur ation.Configura tionSettings.En sureConfigurati onSystem()
                      at System.Configur ation.Configura tionSettings.Ge tConfig(Sring sectionName)
                      at System.Net.WebR equest.get_Pref ixList()
                      at System.Net.WebR equest.Create(U ri requestUri, Boolean useUriBase)
                      at System.Net.WebR equest.Create(U ri requestUri)
                      at System.Net.WebC lient.Openead(S tring address)
                      --- End of inner exception stack trace ---
                      at System.Net.WebC lient.OpenRead( String address)
                      at Softix.Platform .Utils.Config.O penRelativeFile Name(String fileName)

                      Turns out, due to some problem earlier in development, we'd stopped using
                      the app config file, and had hit some problem with win2k boxes,
                      whereby we were getting an error with some service pack combinations if the
                      app.config file wasn't present.

                      The workaround had been to add the following line early in the application
                      startup.
                      AppDomain.Curre ntDomain.SetDat a("APP_CONFIG_F ILE","");

                      We'd subsequently started to use the app.config file, and without noticeable
                      problem, even though we'd left the above line in the code.

                      Seems a win2k3 client, with sp1, throws an error when doing an open read if
                      you have set the app_config_file to "", whether you have an app.config file
                      present or not.

                      Without sp1, the app carries on regardless, without any noticeable impact,
                      though i wonder if its actually reading the app.config file correctly.
                      Note, we are only using the app.config file to set the codebase so that IIS
                      doesn't do excessive probing for .exe and app.config file in various
                      locations, which is a whole different story. I'll have to do more testing to
                      ascertain if things are working properly for all circumstances, but i think
                      that they will be now.

                      Anyway, problem solved. If i remove
                      AppDomain.Curre ntDomain.SetDat a("APP_CONFIG_F ILE",""); the application works
                      correctly from any win2k3 client
                      whether it has sp1 or not.

                      Thanks for your time.

                      "Kevin Yu [MSFT]" wrote:
                      [color=blue]
                      > You're welcome, please post to this thread after a day or two, and I will
                      > follow it up.
                      >
                      > Kevin Yu
                      > =======
                      > "This posting is provided "AS IS" with no warranties, and confers no
                      > rights."
                      >
                      >[/color]

                      Comment

                      • Kevin Yu [MSFT]

                        #12
                        RE: win2k3 sp1 causes System.Net.WebC lient.OpenRead to throw WebEx

                        It was nice to hear that you have had the problem resolved.

                        Thanks for sharing your experience with all the people here. If you have
                        any questions, please feel free to post them in the community.

                        Kevin Yu
                        =======
                        "This posting is provided "AS IS" with no warranties, and confers no
                        rights."

                        Comment

                        Working...