Remoting Problem

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

    #1

    Remoting Problem

    We are working on a distributed VB.Net application which will access a SQL
    database located on a known server. Each client will run on the user's
    local machine. To implement this, we are trying to use remoting for our
    access to the SQL server, with the remoting being via IIS. Since all of our
    users will have accounts in the destination domain, we want to have IIS
    handle the security for us and not allow anonymous. We have set this up
    with one of our development clients and servers, but when we try to connect
    we get the following error message:
    An unhandled exception of type 'System.Net.Web Exception' occurred in
    mscorlib.dll

    Additional information: the remote server returned an error: (401)
    Unauthorized.



    Our configuration is this:
    Component Running on
    Module1 the development machine
    RemotingTest IIS on the development machine
    NorthWind DB SQL Server on another server

    IIS is configured for Windows Authentication, and the directory with the
    RemotingTest object has "Script Source Access" set and the Execute
    Permissions are set to "Scripts and Executables". We have also tried with
    setting IIS to Allow Anonymous, which moves the error out to the SQL
    connection (with the error message of "can't make a connection for user
    NULL"). Even if anonymous did work, it would be a problem for us since the
    application we are using requires the username to be accessible.

    The SQL server is in a different domain from development machine, however a
    trust relationship exists between the two domains. We have verified that
    the trust works by opening the NorthWind database in Enterprise Manager on
    the development machine.

    Can anyone tell us what we are doing wrong here?



  • Nicole Calinoiu

    #2
    Re: Remoting Problem

    Have you set the remoting client to pass the default credentials to the
    server? If so, how? Also, what happens when you attempt to browse to the
    server URL in IE?


    "Ron L" <ronl@bogus.Add ress.com> wrote in message
    news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...[color=blue]
    > We are working on a distributed VB.Net application which will access a SQL
    > database located on a known server. Each client will run on the user's
    > local machine. To implement this, we are trying to use remoting for our
    > access to the SQL server, with the remoting being via IIS. Since all of
    > our users will have accounts in the destination domain, we want to have
    > IIS handle the security for us and not allow anonymous. We have set this
    > up with one of our development clients and servers, but when we try to
    > connect we get the following error message:
    > An unhandled exception of type 'System.Net.Web Exception' occurred in
    > mscorlib.dll
    >
    > Additional information: the remote server returned an error: (401)
    > Unauthorized.
    >
    >
    >
    > Our configuration is this:
    > Component Running on
    > Module1 the development machine
    > RemotingTest IIS on the development machine
    > NorthWind DB SQL Server on another server
    >
    > IIS is configured for Windows Authentication, and the directory with the
    > RemotingTest object has "Script Source Access" set and the Execute
    > Permissions are set to "Scripts and Executables". We have also tried with
    > setting IIS to Allow Anonymous, which moves the error out to the SQL
    > connection (with the error message of "can't make a connection for user
    > NULL"). Even if anonymous did work, it would be a problem for us since
    > the application we are using requires the username to be accessible.
    >
    > The SQL server is in a different domain from development machine, however
    > a trust relationship exists between the two domains. We have verified
    > that the trust works by opening the NorthWind database in Enterprise
    > Manager on the development machine.
    >
    > Can anyone tell us what we are doing wrong here?
    >
    >
    >[/color]


    Comment

    • Nicole Calinoiu

      #3
      Re: Remoting Problem

      Have you set the remoting client to pass the default credentials to the
      server? If so, how? Also, what happens when you attempt to browse to the
      server URL in IE?


      "Ron L" <ronl@bogus.Add ress.com> wrote in message
      news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...[color=blue]
      > We are working on a distributed VB.Net application which will access a SQL
      > database located on a known server. Each client will run on the user's
      > local machine. To implement this, we are trying to use remoting for our
      > access to the SQL server, with the remoting being via IIS. Since all of
      > our users will have accounts in the destination domain, we want to have
      > IIS handle the security for us and not allow anonymous. We have set this
      > up with one of our development clients and servers, but when we try to
      > connect we get the following error message:
      > An unhandled exception of type 'System.Net.Web Exception' occurred in
      > mscorlib.dll
      >
      > Additional information: the remote server returned an error: (401)
      > Unauthorized.
      >
      >
      >
      > Our configuration is this:
      > Component Running on
      > Module1 the development machine
      > RemotingTest IIS on the development machine
      > NorthWind DB SQL Server on another server
      >
      > IIS is configured for Windows Authentication, and the directory with the
      > RemotingTest object has "Script Source Access" set and the Execute
      > Permissions are set to "Scripts and Executables". We have also tried with
      > setting IIS to Allow Anonymous, which moves the error out to the SQL
      > connection (with the error message of "can't make a connection for user
      > NULL"). Even if anonymous did work, it would be a problem for us since
      > the application we are using requires the username to be accessible.
      >
      > The SQL server is in a different domain from development machine, however
      > a trust relationship exists between the two domains. We have verified
      > that the trust works by opening the NorthWind database in Enterprise
      > Manager on the development machine.
      >
      > Can anyone tell us what we are doing wrong here?
      >
      >
      >[/color]


      Comment

      • Cowboy (Gregory A. Beamer) - MVP

        #4
        RE: Remoting Problem

        The issue is IIS connections are anonymous until login. With a local app, you
        do not get a logon box, so you stay anon. Boom!!!

        Good starting point:
        http://msdn.microsoft.com/library/en...SecNetch11.asp

        I assume you are using HTTP as transport (IIS) as you want the built in
        authentication methods. That is fine, but realize you will have to have the
        user log in, or have the machines set up to automatically use the user's
        account. Network admins can push this out, via policy, to avoid individually
        setting up machines.

        --
        Gregory A. Beamer
        MVP; MCP: +I, SE, SD, DBA

        *************** ************
        Think Outside the Box!
        *************** ************


        "Ron L" wrote:
        [color=blue]
        > We are working on a distributed VB.Net application which will access a SQL
        > database located on a known server. Each client will run on the user's
        > local machine. To implement this, we are trying to use remoting for our
        > access to the SQL server, with the remoting being via IIS. Since all of our
        > users will have accounts in the destination domain, we want to have IIS
        > handle the security for us and not allow anonymous. We have set this up
        > with one of our development clients and servers, but when we try to connect
        > we get the following error message:
        > An unhandled exception of type 'System.Net.Web Exception' occurred in
        > mscorlib.dll
        >
        > Additional information: the remote server returned an error: (401)
        > Unauthorized.
        >
        >
        >
        > Our configuration is this:
        > Component Running on
        > Module1 the development machine
        > RemotingTest IIS on the development machine
        > NorthWind DB SQL Server on another server
        >
        > IIS is configured for Windows Authentication, and the directory with the
        > RemotingTest object has "Script Source Access" set and the Execute
        > Permissions are set to "Scripts and Executables". We have also tried with
        > setting IIS to Allow Anonymous, which moves the error out to the SQL
        > connection (with the error message of "can't make a connection for user
        > NULL"). Even if anonymous did work, it would be a problem for us since the
        > application we are using requires the username to be accessible.
        >
        > The SQL server is in a different domain from development machine, however a
        > trust relationship exists between the two domains. We have verified that
        > the trust works by opening the NorthWind database in Enterprise Manager on
        > the development machine.
        >
        > Can anyone tell us what we are doing wrong here?
        >
        >
        >
        >[/color]

        Comment

        • Cowboy (Gregory A. Beamer) - MVP

          #5
          RE: Remoting Problem

          The issue is IIS connections are anonymous until login. With a local app, you
          do not get a logon box, so you stay anon. Boom!!!

          Good starting point:
          http://msdn.microsoft.com/library/en...SecNetch11.asp

          I assume you are using HTTP as transport (IIS) as you want the built in
          authentication methods. That is fine, but realize you will have to have the
          user log in, or have the machines set up to automatically use the user's
          account. Network admins can push this out, via policy, to avoid individually
          setting up machines.

          --
          Gregory A. Beamer
          MVP; MCP: +I, SE, SD, DBA

          *************** ************
          Think Outside the Box!
          *************** ************


          "Ron L" wrote:
          [color=blue]
          > We are working on a distributed VB.Net application which will access a SQL
          > database located on a known server. Each client will run on the user's
          > local machine. To implement this, we are trying to use remoting for our
          > access to the SQL server, with the remoting being via IIS. Since all of our
          > users will have accounts in the destination domain, we want to have IIS
          > handle the security for us and not allow anonymous. We have set this up
          > with one of our development clients and servers, but when we try to connect
          > we get the following error message:
          > An unhandled exception of type 'System.Net.Web Exception' occurred in
          > mscorlib.dll
          >
          > Additional information: the remote server returned an error: (401)
          > Unauthorized.
          >
          >
          >
          > Our configuration is this:
          > Component Running on
          > Module1 the development machine
          > RemotingTest IIS on the development machine
          > NorthWind DB SQL Server on another server
          >
          > IIS is configured for Windows Authentication, and the directory with the
          > RemotingTest object has "Script Source Access" set and the Execute
          > Permissions are set to "Scripts and Executables". We have also tried with
          > setting IIS to Allow Anonymous, which moves the error out to the SQL
          > connection (with the error message of "can't make a connection for user
          > NULL"). Even if anonymous did work, it would be a problem for us since the
          > application we are using requires the username to be accessible.
          >
          > The SQL server is in a different domain from development machine, however a
          > trust relationship exists between the two domains. We have verified that
          > the trust works by opening the NorthWind database in Enterprise Manager on
          > the development machine.
          >
          > Can anyone tell us what we are doing wrong here?
          >
          >
          >
          >[/color]

          Comment

          • Ron L

            #6
            Re: Remoting Problem

            Nicole
            Thanks for your response. I am using a web.config file that I have
            included at the end of this message.

            Ron L

            --------------------------Start
            Web.Config ------------------------------------------------
            <?xml version="1.0" encoding="utf-8" ?>
            <configuratio n>

            <system.web>
            <compilation defaultLanguage ="vb" debug="true" />
            <customErrors mode="RemoteOnl y" />
            <authenticati on mode="Windows" />
            <authorizatio n>
            <allow users="*" /> <!-- Allow all users -->
            <allow verbs="GET" users="*" />
            </authorization>
            <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
            traceMode="Sort ByTime" localOnly="true " />
            <sessionState
            mode="Off"
            />
            <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />

            <identity impersonate="tr ue" />

            </system.web>

            <appSettings>
            <!-- Trusted_Connect ion=yes -->
            <add key="Connection String"
            value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
            Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
            </appSettings>

            <system.runtime .remoting>
            <application>
            <!-- the following section defines the classes we're exposing to clients
            from this host -->
            <service>
            <wellknown mode="SingleCal l"
            objectUri = "NWInfo.rem "
            type = "RemotingTest.N WInfo, RemotingTest" />

            </service>
            <channels>
            <channel ref="http"
            useDefaultCrede ntials="true" />
            </channels>
            </application>
            </system.runtime. remoting>
            </configuration>
            -------------------------- End
            Web.Config -----------------------------------------------
            "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
            news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...[color=blue]
            > Have you set the remoting client to pass the default credentials to the
            > server? If so, how? Also, what happens when you attempt to browse to the
            > server URL in IE?
            >
            >
            > "Ron L" <ronl@bogus.Add ress.com> wrote in message
            > news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...[color=green]
            >> We are working on a distributed VB.Net application which will access a
            >> SQL database located on a known server. Each client will run on the
            >> user's local machine. To implement this, we are trying to use remoting
            >> for our access to the SQL server, with the remoting being via IIS. Since
            >> all of our users will have accounts in the destination domain, we want to
            >> have IIS handle the security for us and not allow anonymous. We have set
            >> this up with one of our development clients and servers, but when we try
            >> to connect we get the following error message:
            >> An unhandled exception of type 'System.Net.Web Exception' occurred in
            >> mscorlib.dll
            >>
            >> Additional information: the remote server returned an error: (401)
            >> Unauthorized.
            >>
            >>
            >>
            >> Our configuration is this:
            >> Component Running on
            >> Module1 the development machine
            >> RemotingTest IIS on the development machine
            >> NorthWind DB SQL Server on another server
            >>
            >> IIS is configured for Windows Authentication, and the directory with the
            >> RemotingTest object has "Script Source Access" set and the Execute
            >> Permissions are set to "Scripts and Executables". We have also tried
            >> with setting IIS to Allow Anonymous, which moves the error out to the SQL
            >> connection (with the error message of "can't make a connection for user
            >> NULL"). Even if anonymous did work, it would be a problem for us since
            >> the application we are using requires the username to be accessible.
            >>
            >> The SQL server is in a different domain from development machine, however
            >> a trust relationship exists between the two domains. We have verified
            >> that the trust works by opening the NorthWind database in Enterprise
            >> Manager on the development machine.
            >>
            >> Can anyone tell us what we are doing wrong here?
            >>
            >>
            >>[/color]
            >
            >[/color]


            Comment

            • Ron L

              #7
              Re: Remoting Problem

              Nicole
              Thanks for your response. I am using a web.config file that I have
              included at the end of this message.

              Ron L

              --------------------------Start
              Web.Config ------------------------------------------------
              <?xml version="1.0" encoding="utf-8" ?>
              <configuratio n>

              <system.web>
              <compilation defaultLanguage ="vb" debug="true" />
              <customErrors mode="RemoteOnl y" />
              <authenticati on mode="Windows" />
              <authorizatio n>
              <allow users="*" /> <!-- Allow all users -->
              <allow verbs="GET" users="*" />
              </authorization>
              <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
              traceMode="Sort ByTime" localOnly="true " />
              <sessionState
              mode="Off"
              />
              <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />

              <identity impersonate="tr ue" />

              </system.web>

              <appSettings>
              <!-- Trusted_Connect ion=yes -->
              <add key="Connection String"
              value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
              Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
              </appSettings>

              <system.runtime .remoting>
              <application>
              <!-- the following section defines the classes we're exposing to clients
              from this host -->
              <service>
              <wellknown mode="SingleCal l"
              objectUri = "NWInfo.rem "
              type = "RemotingTest.N WInfo, RemotingTest" />

              </service>
              <channels>
              <channel ref="http"
              useDefaultCrede ntials="true" />
              </channels>
              </application>
              </system.runtime. remoting>
              </configuration>
              -------------------------- End
              Web.Config -----------------------------------------------
              "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
              news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...[color=blue]
              > Have you set the remoting client to pass the default credentials to the
              > server? If so, how? Also, what happens when you attempt to browse to the
              > server URL in IE?
              >
              >
              > "Ron L" <ronl@bogus.Add ress.com> wrote in message
              > news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...[color=green]
              >> We are working on a distributed VB.Net application which will access a
              >> SQL database located on a known server. Each client will run on the
              >> user's local machine. To implement this, we are trying to use remoting
              >> for our access to the SQL server, with the remoting being via IIS. Since
              >> all of our users will have accounts in the destination domain, we want to
              >> have IIS handle the security for us and not allow anonymous. We have set
              >> this up with one of our development clients and servers, but when we try
              >> to connect we get the following error message:
              >> An unhandled exception of type 'System.Net.Web Exception' occurred in
              >> mscorlib.dll
              >>
              >> Additional information: the remote server returned an error: (401)
              >> Unauthorized.
              >>
              >>
              >>
              >> Our configuration is this:
              >> Component Running on
              >> Module1 the development machine
              >> RemotingTest IIS on the development machine
              >> NorthWind DB SQL Server on another server
              >>
              >> IIS is configured for Windows Authentication, and the directory with the
              >> RemotingTest object has "Script Source Access" set and the Execute
              >> Permissions are set to "Scripts and Executables". We have also tried
              >> with setting IIS to Allow Anonymous, which moves the error out to the SQL
              >> connection (with the error message of "can't make a connection for user
              >> NULL"). Even if anonymous did work, it would be a problem for us since
              >> the application we are using requires the username to be accessible.
              >>
              >> The SQL server is in a different domain from development machine, however
              >> a trust relationship exists between the two domains. We have verified
              >> that the trust works by opening the NorthWind database in Enterprise
              >> Manager on the development machine.
              >>
              >> Can anyone tell us what we are doing wrong here?
              >>
              >>
              >>[/color]
              >
              >[/color]


              Comment

              • Ron L

                #8
                Re: Remoting Problem

                Gregory
                Thanks for the response. I had assumed that IIS would handle the login
                box for me, like it does for ASP. Rats! I will take a look at the link you
                sent. Am I in the same boat with Web Services, or will they provide the
                login box for me?

                Ron L


                "Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld @comcast.netNoS pamM> wrote
                in message news:210A006F-C8BD-470E-9EF6-A496C7BFE894@mi crosoft.com...[color=blue]
                > The issue is IIS connections are anonymous until login. With a local app,
                > you
                > do not get a logon box, so you stay anon. Boom!!!
                >
                > Good starting point:
                > http://msdn.microsoft.com/library/en...SecNetch11.asp
                >
                > I assume you are using HTTP as transport (IIS) as you want the built in
                > authentication methods. That is fine, but realize you will have to have
                > the
                > user log in, or have the machines set up to automatically use the user's
                > account. Network admins can push this out, via policy, to avoid
                > individually
                > setting up machines.
                >
                > --
                > Gregory A. Beamer
                > MVP; MCP: +I, SE, SD, DBA
                >
                > *************** ************
                > Think Outside the Box!
                > *************** ************
                >
                >
                > "Ron L" wrote:
                >[color=green]
                >> We are working on a distributed VB.Net application which will access a
                >> SQL
                >> database located on a known server. Each client will run on the user's
                >> local machine. To implement this, we are trying to use remoting for our
                >> access to the SQL server, with the remoting being via IIS. Since all of
                >> our
                >> users will have accounts in the destination domain, we want to have IIS
                >> handle the security for us and not allow anonymous. We have set this up
                >> with one of our development clients and servers, but when we try to
                >> connect
                >> we get the following error message:
                >> An unhandled exception of type 'System.Net.Web Exception' occurred
                >> in
                >> mscorlib.dll
                >>
                >> Additional information: the remote server returned an error: (401)
                >> Unauthorized.
                >>
                >>
                >>
                >> Our configuration is this:
                >> Component Running on
                >> Module1 the development machine
                >> RemotingTest IIS on the development machine
                >> NorthWind DB SQL Server on another server
                >>
                >> IIS is configured for Windows Authentication, and the directory with the
                >> RemotingTest object has "Script Source Access" set and the Execute
                >> Permissions are set to "Scripts and Executables". We have also tried
                >> with
                >> setting IIS to Allow Anonymous, which moves the error out to the SQL
                >> connection (with the error message of "can't make a connection for user
                >> NULL"). Even if anonymous did work, it would be a problem for us since
                >> the
                >> application we are using requires the username to be accessible.
                >>
                >> The SQL server is in a different domain from development machine, however
                >> a
                >> trust relationship exists between the two domains. We have verified that
                >> the trust works by opening the NorthWind database in Enterprise Manager
                >> on
                >> the development machine.
                >>
                >> Can anyone tell us what we are doing wrong here?
                >>
                >>
                >>
                >>[/color][/color]


                Comment

                • Ron L

                  #9
                  Re: Remoting Problem

                  Gregory
                  Thanks for the response. I had assumed that IIS would handle the login
                  box for me, like it does for ASP. Rats! I will take a look at the link you
                  sent. Am I in the same boat with Web Services, or will they provide the
                  login box for me?

                  Ron L


                  "Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld @comcast.netNoS pamM> wrote
                  in message news:210A006F-C8BD-470E-9EF6-A496C7BFE894@mi crosoft.com...[color=blue]
                  > The issue is IIS connections are anonymous until login. With a local app,
                  > you
                  > do not get a logon box, so you stay anon. Boom!!!
                  >
                  > Good starting point:
                  > http://msdn.microsoft.com/library/en...SecNetch11.asp
                  >
                  > I assume you are using HTTP as transport (IIS) as you want the built in
                  > authentication methods. That is fine, but realize you will have to have
                  > the
                  > user log in, or have the machines set up to automatically use the user's
                  > account. Network admins can push this out, via policy, to avoid
                  > individually
                  > setting up machines.
                  >
                  > --
                  > Gregory A. Beamer
                  > MVP; MCP: +I, SE, SD, DBA
                  >
                  > *************** ************
                  > Think Outside the Box!
                  > *************** ************
                  >
                  >
                  > "Ron L" wrote:
                  >[color=green]
                  >> We are working on a distributed VB.Net application which will access a
                  >> SQL
                  >> database located on a known server. Each client will run on the user's
                  >> local machine. To implement this, we are trying to use remoting for our
                  >> access to the SQL server, with the remoting being via IIS. Since all of
                  >> our
                  >> users will have accounts in the destination domain, we want to have IIS
                  >> handle the security for us and not allow anonymous. We have set this up
                  >> with one of our development clients and servers, but when we try to
                  >> connect
                  >> we get the following error message:
                  >> An unhandled exception of type 'System.Net.Web Exception' occurred
                  >> in
                  >> mscorlib.dll
                  >>
                  >> Additional information: the remote server returned an error: (401)
                  >> Unauthorized.
                  >>
                  >>
                  >>
                  >> Our configuration is this:
                  >> Component Running on
                  >> Module1 the development machine
                  >> RemotingTest IIS on the development machine
                  >> NorthWind DB SQL Server on another server
                  >>
                  >> IIS is configured for Windows Authentication, and the directory with the
                  >> RemotingTest object has "Script Source Access" set and the Execute
                  >> Permissions are set to "Scripts and Executables". We have also tried
                  >> with
                  >> setting IIS to Allow Anonymous, which moves the error out to the SQL
                  >> connection (with the error message of "can't make a connection for user
                  >> NULL"). Even if anonymous did work, it would be a problem for us since
                  >> the
                  >> application we are using requires the username to be accessible.
                  >>
                  >> The SQL server is in a different domain from development machine, however
                  >> a
                  >> trust relationship exists between the two domains. We have verified that
                  >> the trust works by opening the NorthWind database in Enterprise Manager
                  >> on
                  >> the development machine.
                  >>
                  >> Can anyone tell us what we are doing wrong here?
                  >>
                  >>
                  >>
                  >>[/color][/color]


                  Comment

                  • Nicole Calinoiu

                    #10
                    Re: Remoting Problem

                    That looks like your server config file, which isn't what I was asking
                    about. On the client, how are you specifying the credentials that should be
                    sent to the server? (If you don't know what this question means, chances
                    are excellent that you're not sending any credentials, which would explain
                    the authentication problem. <g>) Also, could you please check if you can
                    access the server via IE?



                    "Ron L" <ronl@bogus.Add ress.com> wrote in message
                    news:O%231BRRgZ FHA.3096@TK2MSF TNGP15.phx.gbl. ..[color=blue]
                    > Nicole
                    > Thanks for your response. I am using a web.config file that I have
                    > included at the end of this message.
                    >
                    > Ron L
                    >
                    > --------------------------Start
                    > Web.Config ------------------------------------------------
                    > <?xml version="1.0" encoding="utf-8" ?>
                    > <configuratio n>
                    >
                    > <system.web>
                    > <compilation defaultLanguage ="vb" debug="true" />
                    > <customErrors mode="RemoteOnl y" />
                    > <authenticati on mode="Windows" />
                    > <authorizatio n>
                    > <allow users="*" /> <!-- Allow all users -->
                    > <allow verbs="GET" users="*" />
                    > </authorization>
                    > <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
                    > traceMode="Sort ByTime" localOnly="true " />
                    > <sessionState
                    > mode="Off"
                    > />
                    > <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
                    >
                    > <identity impersonate="tr ue" />
                    >
                    > </system.web>
                    >
                    > <appSettings>
                    > <!-- Trusted_Connect ion=yes -->
                    > <add key="Connection String"
                    > value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
                    > Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
                    > </appSettings>
                    >
                    > <system.runtime .remoting>
                    > <application>
                    > <!-- the following section defines the classes we're exposing to clients
                    > from this host -->
                    > <service>
                    > <wellknown mode="SingleCal l"
                    > objectUri = "NWInfo.rem "
                    > type = "RemotingTest.N WInfo, RemotingTest" />
                    >
                    > </service>
                    > <channels>
                    > <channel ref="http"
                    > useDefaultCrede ntials="true" />
                    > </channels>
                    > </application>
                    > </system.runtime. remoting>
                    > </configuration>
                    > -------------------------- End
                    > Web.Config -----------------------------------------------
                    > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                    > news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...[color=green]
                    >> Have you set the remoting client to pass the default credentials to the
                    >> server? If so, how? Also, what happens when you attempt to browse to
                    >> the server URL in IE?
                    >>
                    >>
                    >> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                    >> news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...[color=darkred]
                    >>> We are working on a distributed VB.Net application which will access a
                    >>> SQL database located on a known server. Each client will run on the
                    >>> user's local machine. To implement this, we are trying to use remoting
                    >>> for our access to the SQL server, with the remoting being via IIS.
                    >>> Since all of our users will have accounts in the destination domain, we
                    >>> want to have IIS handle the security for us and not allow anonymous. We
                    >>> have set this up with one of our development clients and servers, but
                    >>> when we try to connect we get the following error message:
                    >>> An unhandled exception of type 'System.Net.Web Exception' occurred
                    >>> in mscorlib.dll
                    >>>
                    >>> Additional information: the remote server returned an error: (401)
                    >>> Unauthorized.
                    >>>
                    >>>
                    >>>
                    >>> Our configuration is this:
                    >>> Component Running on
                    >>> Module1 the development machine
                    >>> RemotingTest IIS on the development machine
                    >>> NorthWind DB SQL Server on another server
                    >>>
                    >>> IIS is configured for Windows Authentication, and the directory with the
                    >>> RemotingTest object has "Script Source Access" set and the Execute
                    >>> Permissions are set to "Scripts and Executables". We have also tried
                    >>> with setting IIS to Allow Anonymous, which moves the error out to the
                    >>> SQL connection (with the error message of "can't make a connection for
                    >>> user NULL"). Even if anonymous did work, it would be a problem for us
                    >>> since the application we are using requires the username to be
                    >>> accessible.
                    >>>
                    >>> The SQL server is in a different domain from development machine,
                    >>> however a trust relationship exists between the two domains. We have
                    >>> verified that the trust works by opening the NorthWind database in
                    >>> Enterprise Manager on the development machine.
                    >>>
                    >>> Can anyone tell us what we are doing wrong here?
                    >>>
                    >>>
                    >>>[/color]
                    >>
                    >>[/color]
                    >
                    >[/color]


                    Comment

                    • Nicole Calinoiu

                      #11
                      Re: Remoting Problem

                      That looks like your server config file, which isn't what I was asking
                      about. On the client, how are you specifying the credentials that should be
                      sent to the server? (If you don't know what this question means, chances
                      are excellent that you're not sending any credentials, which would explain
                      the authentication problem. <g>) Also, could you please check if you can
                      access the server via IE?



                      "Ron L" <ronl@bogus.Add ress.com> wrote in message
                      news:O%231BRRgZ FHA.3096@TK2MSF TNGP15.phx.gbl. ..[color=blue]
                      > Nicole
                      > Thanks for your response. I am using a web.config file that I have
                      > included at the end of this message.
                      >
                      > Ron L
                      >
                      > --------------------------Start
                      > Web.Config ------------------------------------------------
                      > <?xml version="1.0" encoding="utf-8" ?>
                      > <configuratio n>
                      >
                      > <system.web>
                      > <compilation defaultLanguage ="vb" debug="true" />
                      > <customErrors mode="RemoteOnl y" />
                      > <authenticati on mode="Windows" />
                      > <authorizatio n>
                      > <allow users="*" /> <!-- Allow all users -->
                      > <allow verbs="GET" users="*" />
                      > </authorization>
                      > <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
                      > traceMode="Sort ByTime" localOnly="true " />
                      > <sessionState
                      > mode="Off"
                      > />
                      > <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
                      >
                      > <identity impersonate="tr ue" />
                      >
                      > </system.web>
                      >
                      > <appSettings>
                      > <!-- Trusted_Connect ion=yes -->
                      > <add key="Connection String"
                      > value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
                      > Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
                      > </appSettings>
                      >
                      > <system.runtime .remoting>
                      > <application>
                      > <!-- the following section defines the classes we're exposing to clients
                      > from this host -->
                      > <service>
                      > <wellknown mode="SingleCal l"
                      > objectUri = "NWInfo.rem "
                      > type = "RemotingTest.N WInfo, RemotingTest" />
                      >
                      > </service>
                      > <channels>
                      > <channel ref="http"
                      > useDefaultCrede ntials="true" />
                      > </channels>
                      > </application>
                      > </system.runtime. remoting>
                      > </configuration>
                      > -------------------------- End
                      > Web.Config -----------------------------------------------
                      > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                      > news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...[color=green]
                      >> Have you set the remoting client to pass the default credentials to the
                      >> server? If so, how? Also, what happens when you attempt to browse to
                      >> the server URL in IE?
                      >>
                      >>
                      >> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                      >> news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...[color=darkred]
                      >>> We are working on a distributed VB.Net application which will access a
                      >>> SQL database located on a known server. Each client will run on the
                      >>> user's local machine. To implement this, we are trying to use remoting
                      >>> for our access to the SQL server, with the remoting being via IIS.
                      >>> Since all of our users will have accounts in the destination domain, we
                      >>> want to have IIS handle the security for us and not allow anonymous. We
                      >>> have set this up with one of our development clients and servers, but
                      >>> when we try to connect we get the following error message:
                      >>> An unhandled exception of type 'System.Net.Web Exception' occurred
                      >>> in mscorlib.dll
                      >>>
                      >>> Additional information: the remote server returned an error: (401)
                      >>> Unauthorized.
                      >>>
                      >>>
                      >>>
                      >>> Our configuration is this:
                      >>> Component Running on
                      >>> Module1 the development machine
                      >>> RemotingTest IIS on the development machine
                      >>> NorthWind DB SQL Server on another server
                      >>>
                      >>> IIS is configured for Windows Authentication, and the directory with the
                      >>> RemotingTest object has "Script Source Access" set and the Execute
                      >>> Permissions are set to "Scripts and Executables". We have also tried
                      >>> with setting IIS to Allow Anonymous, which moves the error out to the
                      >>> SQL connection (with the error message of "can't make a connection for
                      >>> user NULL"). Even if anonymous did work, it would be a problem for us
                      >>> since the application we are using requires the username to be
                      >>> accessible.
                      >>>
                      >>> The SQL server is in a different domain from development machine,
                      >>> however a trust relationship exists between the two domains. We have
                      >>> verified that the trust works by opening the NorthWind database in
                      >>> Enterprise Manager on the development machine.
                      >>>
                      >>> Can anyone tell us what we are doing wrong here?
                      >>>
                      >>>
                      >>>[/color]
                      >>
                      >>[/color]
                      >
                      >[/color]


                      Comment

                      • Ron L

                        #12
                        Re: Remoting Problem

                        Nicole
                        I guess I don't know how I am specifying the credentials on the client
                        side. As I said to Gregory, I was assuming that IIS handled the credentials
                        as it does for ASP. As to accessing the server, if I enter the following
                        URL:


                        I get an automatically generated web page listing the message names, port
                        names, binding names, etc.

                        Ron L



                        "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                        news:%23yJ7ObgZ FHA.3712@TK2MSF TNGP09.phx.gbl. ..[color=blue]
                        > That looks like your server config file, which isn't what I was asking
                        > about. On the client, how are you specifying the credentials that should
                        > be sent to the server? (If you don't know what this question means,
                        > chances are excellent that you're not sending any credentials, which would
                        > explain the authentication problem. <g>) Also, could you please check if
                        > you can access the server via IE?
                        >
                        >
                        >
                        > "Ron L" <ronl@bogus.Add ress.com> wrote in message
                        > news:O%231BRRgZ FHA.3096@TK2MSF TNGP15.phx.gbl. ..[color=green]
                        >> Nicole
                        >> Thanks for your response. I am using a web.config file that I have
                        >> included at the end of this message.
                        >>
                        >> Ron L
                        >>
                        >> --------------------------Start
                        >> Web.Config ------------------------------------------------
                        >> <?xml version="1.0" encoding="utf-8" ?>
                        >> <configuratio n>
                        >>
                        >> <system.web>
                        >> <compilation defaultLanguage ="vb" debug="true" />
                        >> <customErrors mode="RemoteOnl y" />
                        >> <authenticati on mode="Windows" />
                        >> <authorizatio n>
                        >> <allow users="*" /> <!-- Allow all users -->
                        >> <allow verbs="GET" users="*" />
                        >> </authorization>
                        >> <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
                        >> traceMode="Sort ByTime" localOnly="true " />
                        >> <sessionState
                        >> mode="Off"
                        >> />
                        >> <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
                        >>
                        >> <identity impersonate="tr ue" />
                        >>
                        >> </system.web>
                        >>
                        >> <appSettings>
                        >> <!-- Trusted_Connect ion=yes -->
                        >> <add key="Connection String"
                        >> value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
                        >> Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
                        >> </appSettings>
                        >>
                        >> <system.runtime .remoting>
                        >> <application>
                        >> <!-- the following section defines the classes we're exposing to
                        >> clients from this host -->
                        >> <service>
                        >> <wellknown mode="SingleCal l"
                        >> objectUri = "NWInfo.rem "
                        >> type = "RemotingTest.N WInfo, RemotingTest" />
                        >>
                        >> </service>
                        >> <channels>
                        >> <channel ref="http"
                        >> useDefaultCrede ntials="true" />
                        >> </channels>
                        >> </application>
                        >> </system.runtime. remoting>
                        >> </configuration>
                        >> -------------------------- End
                        >> Web.Config -----------------------------------------------
                        >> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                        >> news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...[color=darkred]
                        >>> Have you set the remoting client to pass the default credentials to the
                        >>> server? If so, how? Also, what happens when you attempt to browse to
                        >>> the server URL in IE?
                        >>>
                        >>>
                        >>> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                        >>> news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...
                        >>>> We are working on a distributed VB.Net application which will access a
                        >>>> SQL database located on a known server. Each client will run on the
                        >>>> user's local machine. To implement this, we are trying to use remoting
                        >>>> for our access to the SQL server, with the remoting being via IIS.
                        >>>> Since all of our users will have accounts in the destination domain, we
                        >>>> want to have IIS handle the security for us and not allow anonymous.
                        >>>> We have set this up with one of our development clients and servers,
                        >>>> but when we try to connect we get the following error message:
                        >>>> An unhandled exception of type 'System.Net.Web Exception' occurred
                        >>>> in mscorlib.dll
                        >>>>
                        >>>> Additional information: the remote server returned an error: (401)
                        >>>> Unauthorized.
                        >>>>
                        >>>>
                        >>>>
                        >>>> Our configuration is this:
                        >>>> Component Running on
                        >>>> Module1 the development machine
                        >>>> RemotingTest IIS on the development machine
                        >>>> NorthWind DB SQL Server on another server
                        >>>>
                        >>>> IIS is configured for Windows Authentication, and the directory with
                        >>>> the RemotingTest object has "Script Source Access" set and the Execute
                        >>>> Permissions are set to "Scripts and Executables". We have also tried
                        >>>> with setting IIS to Allow Anonymous, which moves the error out to the
                        >>>> SQL connection (with the error message of "can't make a connection for
                        >>>> user NULL"). Even if anonymous did work, it would be a problem for us
                        >>>> since the application we are using requires the username to be
                        >>>> accessible.
                        >>>>
                        >>>> The SQL server is in a different domain from development machine,
                        >>>> however a trust relationship exists between the two domains. We have
                        >>>> verified that the trust works by opening the NorthWind database in
                        >>>> Enterprise Manager on the development machine.
                        >>>>
                        >>>> Can anyone tell us what we are doing wrong here?
                        >>>>
                        >>>>
                        >>>>
                        >>>
                        >>>[/color]
                        >>
                        >>[/color]
                        >
                        >[/color]


                        Comment

                        • Ron L

                          #13
                          Re: Remoting Problem

                          Nicole
                          I guess I don't know how I am specifying the credentials on the client
                          side. As I said to Gregory, I was assuming that IIS handled the credentials
                          as it does for ASP. As to accessing the server, if I enter the following
                          URL:


                          I get an automatically generated web page listing the message names, port
                          names, binding names, etc.

                          Ron L



                          "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                          news:%23yJ7ObgZ FHA.3712@TK2MSF TNGP09.phx.gbl. ..[color=blue]
                          > That looks like your server config file, which isn't what I was asking
                          > about. On the client, how are you specifying the credentials that should
                          > be sent to the server? (If you don't know what this question means,
                          > chances are excellent that you're not sending any credentials, which would
                          > explain the authentication problem. <g>) Also, could you please check if
                          > you can access the server via IE?
                          >
                          >
                          >
                          > "Ron L" <ronl@bogus.Add ress.com> wrote in message
                          > news:O%231BRRgZ FHA.3096@TK2MSF TNGP15.phx.gbl. ..[color=green]
                          >> Nicole
                          >> Thanks for your response. I am using a web.config file that I have
                          >> included at the end of this message.
                          >>
                          >> Ron L
                          >>
                          >> --------------------------Start
                          >> Web.Config ------------------------------------------------
                          >> <?xml version="1.0" encoding="utf-8" ?>
                          >> <configuratio n>
                          >>
                          >> <system.web>
                          >> <compilation defaultLanguage ="vb" debug="true" />
                          >> <customErrors mode="RemoteOnl y" />
                          >> <authenticati on mode="Windows" />
                          >> <authorizatio n>
                          >> <allow users="*" /> <!-- Allow all users -->
                          >> <allow verbs="GET" users="*" />
                          >> </authorization>
                          >> <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
                          >> traceMode="Sort ByTime" localOnly="true " />
                          >> <sessionState
                          >> mode="Off"
                          >> />
                          >> <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
                          >>
                          >> <identity impersonate="tr ue" />
                          >>
                          >> </system.web>
                          >>
                          >> <appSettings>
                          >> <!-- Trusted_Connect ion=yes -->
                          >> <add key="Connection String"
                          >> value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
                          >> Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
                          >> </appSettings>
                          >>
                          >> <system.runtime .remoting>
                          >> <application>
                          >> <!-- the following section defines the classes we're exposing to
                          >> clients from this host -->
                          >> <service>
                          >> <wellknown mode="SingleCal l"
                          >> objectUri = "NWInfo.rem "
                          >> type = "RemotingTest.N WInfo, RemotingTest" />
                          >>
                          >> </service>
                          >> <channels>
                          >> <channel ref="http"
                          >> useDefaultCrede ntials="true" />
                          >> </channels>
                          >> </application>
                          >> </system.runtime. remoting>
                          >> </configuration>
                          >> -------------------------- End
                          >> Web.Config -----------------------------------------------
                          >> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                          >> news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...[color=darkred]
                          >>> Have you set the remoting client to pass the default credentials to the
                          >>> server? If so, how? Also, what happens when you attempt to browse to
                          >>> the server URL in IE?
                          >>>
                          >>>
                          >>> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                          >>> news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...
                          >>>> We are working on a distributed VB.Net application which will access a
                          >>>> SQL database located on a known server. Each client will run on the
                          >>>> user's local machine. To implement this, we are trying to use remoting
                          >>>> for our access to the SQL server, with the remoting being via IIS.
                          >>>> Since all of our users will have accounts in the destination domain, we
                          >>>> want to have IIS handle the security for us and not allow anonymous.
                          >>>> We have set this up with one of our development clients and servers,
                          >>>> but when we try to connect we get the following error message:
                          >>>> An unhandled exception of type 'System.Net.Web Exception' occurred
                          >>>> in mscorlib.dll
                          >>>>
                          >>>> Additional information: the remote server returned an error: (401)
                          >>>> Unauthorized.
                          >>>>
                          >>>>
                          >>>>
                          >>>> Our configuration is this:
                          >>>> Component Running on
                          >>>> Module1 the development machine
                          >>>> RemotingTest IIS on the development machine
                          >>>> NorthWind DB SQL Server on another server
                          >>>>
                          >>>> IIS is configured for Windows Authentication, and the directory with
                          >>>> the RemotingTest object has "Script Source Access" set and the Execute
                          >>>> Permissions are set to "Scripts and Executables". We have also tried
                          >>>> with setting IIS to Allow Anonymous, which moves the error out to the
                          >>>> SQL connection (with the error message of "can't make a connection for
                          >>>> user NULL"). Even if anonymous did work, it would be a problem for us
                          >>>> since the application we are using requires the username to be
                          >>>> accessible.
                          >>>>
                          >>>> The SQL server is in a different domain from development machine,
                          >>>> however a trust relationship exists between the two domains. We have
                          >>>> verified that the trust works by opening the NorthWind database in
                          >>>> Enterprise Manager on the development machine.
                          >>>>
                          >>>> Can anyone tell us what we are doing wrong here?
                          >>>>
                          >>>>
                          >>>>
                          >>>
                          >>>[/color]
                          >>
                          >>[/color]
                          >
                          >[/color]


                          Comment

                          • Nicole Calinoiu

                            #14
                            Re: Remoting Problem

                            "Ron L" <ronl@bogus.Add ress.com> wrote in message
                            news:uIT6LpgZFH A.3960@TK2MSFTN GP10.phx.gbl...[color=blue]
                            > Nicole
                            > I guess I don't know how I am specifying the credentials on the client
                            > side.[/color]

                            Then chances are very good that the client credentials aren't being passed.
                            See http://msdn.microsoft.com/library/en...SecNetch11.asp
                            (particularly the "Passing Credentials for Authentication to Remote Objects"
                            section) for possible approaches.

                            [color=blue]
                            > As I said to Gregory, I was assuming that IIS handled the credentials as
                            > it does for ASP.[/color]

                            IIS will perform the user authentication, but only if the user's credentials
                            are passed from the client machine, which is something that IIS cannot do.
                            The transparent passing of client credentials that you see when using IE to
                            browse a Windows-authenticated intranet site is because IE is configured to
                            pass those credentials without user intervention. You'll need to make it
                            possible for your client application to pass the same credentials.

                            [color=blue]
                            > As to accessing the server, if I enter the following URL:
                            > http://localhost/dotNet/remotingtest/nwinfo.rem?wsdl
                            >
                            > I get an automatically generated web page listing the message names, port
                            > names, binding names, etc.[/color]

                            What happens if you disable the intranet zone automatic logon in IE?

                            [color=blue]
                            >
                            > Ron L
                            >
                            >
                            >
                            > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                            > news:%23yJ7ObgZ FHA.3712@TK2MSF TNGP09.phx.gbl. ..[color=green]
                            >> That looks like your server config file, which isn't what I was asking
                            >> about. On the client, how are you specifying the credentials that should
                            >> be sent to the server? (If you don't know what this question means,
                            >> chances are excellent that you're not sending any credentials, which
                            >> would explain the authentication problem. <g>) Also, could you please
                            >> check if you can access the server via IE?
                            >>
                            >>
                            >>
                            >> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                            >> news:O%231BRRgZ FHA.3096@TK2MSF TNGP15.phx.gbl. ..[color=darkred]
                            >>> Nicole
                            >>> Thanks for your response. I am using a web.config file that I have
                            >>> included at the end of this message.
                            >>>
                            >>> Ron L
                            >>>
                            >>> --------------------------Start
                            >>> Web.Config ------------------------------------------------
                            >>> <?xml version="1.0" encoding="utf-8" ?>
                            >>> <configuratio n>
                            >>>
                            >>> <system.web>
                            >>> <compilation defaultLanguage ="vb" debug="true" />
                            >>> <customErrors mode="RemoteOnl y" />
                            >>> <authenticati on mode="Windows" />
                            >>> <authorizatio n>
                            >>> <allow users="*" /> <!-- Allow all users -->
                            >>> <allow verbs="GET" users="*" />
                            >>> </authorization>
                            >>> <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
                            >>> traceMode="Sort ByTime" localOnly="true " />
                            >>> <sessionState
                            >>> mode="Off"
                            >>> />
                            >>> <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
                            >>>
                            >>> <identity impersonate="tr ue" />
                            >>>
                            >>> </system.web>
                            >>>
                            >>> <appSettings>
                            >>> <!-- Trusted_Connect ion=yes -->
                            >>> <add key="Connection String"
                            >>> value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
                            >>> Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
                            >>> </appSettings>
                            >>>
                            >>> <system.runtime .remoting>
                            >>> <application>
                            >>> <!-- the following section defines the classes we're exposing to
                            >>> clients from this host -->
                            >>> <service>
                            >>> <wellknown mode="SingleCal l"
                            >>> objectUri = "NWInfo.rem "
                            >>> type = "RemotingTest.N WInfo, RemotingTest" />
                            >>>
                            >>> </service>
                            >>> <channels>
                            >>> <channel ref="http"
                            >>> useDefaultCrede ntials="true" />
                            >>> </channels>
                            >>> </application>
                            >>> </system.runtime. remoting>
                            >>> </configuration>
                            >>> -------------------------- End
                            >>> Web.Config -----------------------------------------------
                            >>> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in
                            >>> message news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...
                            >>>> Have you set the remoting client to pass the default credentials to the
                            >>>> server? If so, how? Also, what happens when you attempt to browse to
                            >>>> the server URL in IE?
                            >>>>
                            >>>>
                            >>>> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                            >>>> news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...
                            >>>>> We are working on a distributed VB.Net application which will access a
                            >>>>> SQL database located on a known server. Each client will run on the
                            >>>>> user's local machine. To implement this, we are trying to use
                            >>>>> remoting for our access to the SQL server, with the remoting being via
                            >>>>> IIS. Since all of our users will have accounts in the destination
                            >>>>> domain, we want to have IIS handle the security for us and not allow
                            >>>>> anonymous. We have set this up with one of our development clients and
                            >>>>> servers, but when we try to connect we get the following error
                            >>>>> message:
                            >>>>> An unhandled exception of type 'System.Net.Web Exception' occurred
                            >>>>> in mscorlib.dll
                            >>>>>
                            >>>>> Additional information: the remote server returned an error:
                            >>>>> (401) Unauthorized.
                            >>>>>
                            >>>>>
                            >>>>>
                            >>>>> Our configuration is this:
                            >>>>> Component Running on
                            >>>>> Module1 the development machine
                            >>>>> RemotingTest IIS on the development machine
                            >>>>> NorthWind DB SQL Server on another server
                            >>>>>
                            >>>>> IIS is configured for Windows Authentication, and the directory with
                            >>>>> the RemotingTest object has "Script Source Access" set and the Execute
                            >>>>> Permissions are set to "Scripts and Executables". We have also tried
                            >>>>> with setting IIS to Allow Anonymous, which moves the error out to the
                            >>>>> SQL connection (with the error message of "can't make a connection for
                            >>>>> user NULL"). Even if anonymous did work, it would be a problem for us
                            >>>>> since the application we are using requires the username to be
                            >>>>> accessible.
                            >>>>>
                            >>>>> The SQL server is in a different domain from development machine,
                            >>>>> however a trust relationship exists between the two domains. We have
                            >>>>> verified that the trust works by opening the NorthWind database in
                            >>>>> Enterprise Manager on the development machine.
                            >>>>>
                            >>>>> Can anyone tell us what we are doing wrong here?
                            >>>>>
                            >>>>>
                            >>>>>
                            >>>>
                            >>>>
                            >>>
                            >>>[/color]
                            >>
                            >>[/color]
                            >
                            >[/color]


                            Comment

                            • Nicole Calinoiu

                              #15
                              Re: Remoting Problem

                              "Ron L" <ronl@bogus.Add ress.com> wrote in message
                              news:uIT6LpgZFH A.3960@TK2MSFTN GP10.phx.gbl...[color=blue]
                              > Nicole
                              > I guess I don't know how I am specifying the credentials on the client
                              > side.[/color]

                              Then chances are very good that the client credentials aren't being passed.
                              See http://msdn.microsoft.com/library/en...SecNetch11.asp
                              (particularly the "Passing Credentials for Authentication to Remote Objects"
                              section) for possible approaches.

                              [color=blue]
                              > As I said to Gregory, I was assuming that IIS handled the credentials as
                              > it does for ASP.[/color]

                              IIS will perform the user authentication, but only if the user's credentials
                              are passed from the client machine, which is something that IIS cannot do.
                              The transparent passing of client credentials that you see when using IE to
                              browse a Windows-authenticated intranet site is because IE is configured to
                              pass those credentials without user intervention. You'll need to make it
                              possible for your client application to pass the same credentials.

                              [color=blue]
                              > As to accessing the server, if I enter the following URL:
                              > http://localhost/dotNet/remotingtest/nwinfo.rem?wsdl
                              >
                              > I get an automatically generated web page listing the message names, port
                              > names, binding names, etc.[/color]

                              What happens if you disable the intranet zone automatic logon in IE?

                              [color=blue]
                              >
                              > Ron L
                              >
                              >
                              >
                              > "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
                              > news:%23yJ7ObgZ FHA.3712@TK2MSF TNGP09.phx.gbl. ..[color=green]
                              >> That looks like your server config file, which isn't what I was asking
                              >> about. On the client, how are you specifying the credentials that should
                              >> be sent to the server? (If you don't know what this question means,
                              >> chances are excellent that you're not sending any credentials, which
                              >> would explain the authentication problem. <g>) Also, could you please
                              >> check if you can access the server via IE?
                              >>
                              >>
                              >>
                              >> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                              >> news:O%231BRRgZ FHA.3096@TK2MSF TNGP15.phx.gbl. ..[color=darkred]
                              >>> Nicole
                              >>> Thanks for your response. I am using a web.config file that I have
                              >>> included at the end of this message.
                              >>>
                              >>> Ron L
                              >>>
                              >>> --------------------------Start
                              >>> Web.Config ------------------------------------------------
                              >>> <?xml version="1.0" encoding="utf-8" ?>
                              >>> <configuratio n>
                              >>>
                              >>> <system.web>
                              >>> <compilation defaultLanguage ="vb" debug="true" />
                              >>> <customErrors mode="RemoteOnl y" />
                              >>> <authenticati on mode="Windows" />
                              >>> <authorizatio n>
                              >>> <allow users="*" /> <!-- Allow all users -->
                              >>> <allow verbs="GET" users="*" />
                              >>> </authorization>
                              >>> <trace enabled="false" requestLimit="1 0" pageOutput="fal se"
                              >>> traceMode="Sort ByTime" localOnly="true " />
                              >>> <sessionState
                              >>> mode="Off"
                              >>> />
                              >>> <globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
                              >>>
                              >>> <identity impersonate="tr ue" />
                              >>>
                              >>> </system.web>
                              >>>
                              >>> <appSettings>
                              >>> <!-- Trusted_Connect ion=yes -->
                              >>> <add key="Connection String"
                              >>> value="Provider =SQLOLEDB;Data Source=Dev2k;In itial
                              >>> Catalog=Northwi nd;Integrated Security=SSPI;T rusted_Connecti on=yes " />
                              >>> </appSettings>
                              >>>
                              >>> <system.runtime .remoting>
                              >>> <application>
                              >>> <!-- the following section defines the classes we're exposing to
                              >>> clients from this host -->
                              >>> <service>
                              >>> <wellknown mode="SingleCal l"
                              >>> objectUri = "NWInfo.rem "
                              >>> type = "RemotingTest.N WInfo, RemotingTest" />
                              >>>
                              >>> </service>
                              >>> <channels>
                              >>> <channel ref="http"
                              >>> useDefaultCrede ntials="true" />
                              >>> </channels>
                              >>> </application>
                              >>> </system.runtime. remoting>
                              >>> </configuration>
                              >>> -------------------------- End
                              >>> Web.Config -----------------------------------------------
                              >>> "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in
                              >>> message news:uO2gxmfZFH A.3648@TK2MSFTN GP14.phx.gbl...
                              >>>> Have you set the remoting client to pass the default credentials to the
                              >>>> server? If so, how? Also, what happens when you attempt to browse to
                              >>>> the server URL in IE?
                              >>>>
                              >>>>
                              >>>> "Ron L" <ronl@bogus.Add ress.com> wrote in message
                              >>>> news:eg4E7IeZFH A.3220@TK2MSFTN GP14.phx.gbl...
                              >>>>> We are working on a distributed VB.Net application which will access a
                              >>>>> SQL database located on a known server. Each client will run on the
                              >>>>> user's local machine. To implement this, we are trying to use
                              >>>>> remoting for our access to the SQL server, with the remoting being via
                              >>>>> IIS. Since all of our users will have accounts in the destination
                              >>>>> domain, we want to have IIS handle the security for us and not allow
                              >>>>> anonymous. We have set this up with one of our development clients and
                              >>>>> servers, but when we try to connect we get the following error
                              >>>>> message:
                              >>>>> An unhandled exception of type 'System.Net.Web Exception' occurred
                              >>>>> in mscorlib.dll
                              >>>>>
                              >>>>> Additional information: the remote server returned an error:
                              >>>>> (401) Unauthorized.
                              >>>>>
                              >>>>>
                              >>>>>
                              >>>>> Our configuration is this:
                              >>>>> Component Running on
                              >>>>> Module1 the development machine
                              >>>>> RemotingTest IIS on the development machine
                              >>>>> NorthWind DB SQL Server on another server
                              >>>>>
                              >>>>> IIS is configured for Windows Authentication, and the directory with
                              >>>>> the RemotingTest object has "Script Source Access" set and the Execute
                              >>>>> Permissions are set to "Scripts and Executables". We have also tried
                              >>>>> with setting IIS to Allow Anonymous, which moves the error out to the
                              >>>>> SQL connection (with the error message of "can't make a connection for
                              >>>>> user NULL"). Even if anonymous did work, it would be a problem for us
                              >>>>> since the application we are using requires the username to be
                              >>>>> accessible.
                              >>>>>
                              >>>>> The SQL server is in a different domain from development machine,
                              >>>>> however a trust relationship exists between the two domains. We have
                              >>>>> verified that the trust works by opening the NorthWind database in
                              >>>>> Enterprise Manager on the development machine.
                              >>>>>
                              >>>>> Can anyone tell us what we are doing wrong here?
                              >>>>>
                              >>>>>
                              >>>>>
                              >>>>
                              >>>>
                              >>>
                              >>>[/color]
                              >>
                              >>[/color]
                              >
                              >[/color]


                              Comment

                              Working...