Call to Server with HttpWebRequestClass before logged on to windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tobeki
    New Member
    • Feb 2010
    • 6

    Call to Server with HttpWebRequestClass before logged on to windows

    Hi guys,

    i hope you can help me with my head-against-the-wall-bouncing-problem. First the scenario:

    winlogon.exe (with customized GINA) calls a win32-DLL which calls to my C++-DLL (ummaged C / managed C++ bridge), which references my HttpWebRequest-C#-DLL which calls the Http-Server-address.

    If i run my HttpWebRequest class standalone from a testApp.exe, AFTER windows logon, to call the remote Http-Server it works. But if try to call the server (above described scenario) BEFORE logged on to windows this creation fails with a System.Configur ation.Configura tionErrorsExcep tion:

    HttpWebRequest req = new (HttpWebRequest ) WebRequest.Crea te(server-uri);

    My HttpWebRequest-C#-DLL does not lie in the winlogon.exe (system32) application folder, but it is referenceable via GAC. Is this a permission problem with machine.config ? How can i fix it ? Can i provide an app.config to my C#-DLL with permission settings to allow the Http-Server-Call?

    Thanks in advance and
    greatings from Bavaria
    Tobias
  • tobeki
    New Member
    • Feb 2010
    • 6

    #2
    The exception in detail:
    "The configuration system could not be initialized.."

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Says you have illegal characters.
      Your locale (language/keyboard/etc) settings are stored on a per user basis.
      So if you're not logged on as a user, you're getting the system default local, which could possibly be en-US and not have the characters you are after

      Comment

      • tobeki
        New Member
        • Feb 2010
        • 6

        #4
        thanks for your reply!
        so you think that in system internal use the url parameter is not interpreted as e.g. http://192.168.2.4:8181/CustomerServer/servicename, but as (EN locale) http>&&192.168. 2.4>8181&Custom erServer&servic ename ?
        the test messagebox shows the url with correct special characters.. but i am not able to debug this from GINA. maybe you are right.
        For testing.. is there a way to set the locale to a fixed locale (en or ger) programmaticall y before i call the HttpWebRequest / WebClient class ?

        Comment

        • tobeki
          New Member
          • Feb 2010
          • 6

          #5
          The developer system is a Windows Server 2003 (en) with VS2008 (en). The test machine (the windows-client i get the exception) runs on a XP Professional (ger)

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Yes that def sounds like a language setting issue.
            I think if you look up globalization and Culture settings you should find help on it.
            I've never done it myself so I cannot be sure.

            Comment

            • tobeki
              New Member
              • Feb 2010
              • 6

              #7
              ok i have tested the "locale-case". It is not the problem. But this code of line

              Uri url = new Uri("www.googe. com");

              called from Windows GINA, before logged on to windows does show a bluescreen.

              I seems to me that some System.Net classes, neccessary for http-communication, are not initialized yet (at this moment).. :(

              Comment

              • tobeki
                New Member
                • Feb 2010
                • 6

                #8
                Problem solved without System.Net.

                Comment

                Working...