Win Server 2003 Config problem

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

    Win Server 2003 Config problem

    I have an application that I am working on with 2 other developers. The
    applciation uses Remoting for our calls to SQL Server. We have been
    developing and testing against our development machines (win XP), and
    remoting is working fine, but yesterday we attempted to install our
    application on our shared server and we keep getting 401 - Not Authorized
    errors whenever a remoting call is made. To get the application to the
    server, we got all the files from Source Safe to the server, and built the
    application locally (on the server). This created the directory we needed
    on the server's web site. I had to manually set the directory to be its own
    application (to mimic the setup Visual Studio had automatically created on
    our development machines).

    In addition to the 401 error we are getting when we access the remoting
    classes programmaticall y, we also get an error page if we try to browse to
    the WSDL.

    Our Web.Config has the following Channels definitions:
    <channels>
    <identity impersonate="tr ue" />
    <channel ref="http" useDefaultCrede ntials="true">
    <clientProvider s>
    <formatter ref="binary" />
    </clientProviders >
    </channel>
    </channels>

    and our code includes the credentials in the channel properties:
    _commonMdl =
    CType(Activator .GetObject(GetT ype(ModelInterf ace.ICommonMode l), _serverURL &
    _
    "CommonModel.re m"),
    ModelInterface. ICommonModel)
    _commonChannelP rops =
    ChannelServices .GetChannelSink Properties(_com monMdl)
    _commonChannelP rops("credentia ls") = CredentialCache .DefaultCredent ials

    I assume that, since the code works on the XP development machines, the
    problem must be a configuration problem with the Win2k3 server/IIS6. Can
    anyone point me to where the problem may be? I have been searching MS and
    Google for 2 days without finding anything that appears to be relevant.

    TIA
    Ron L


  • Clemens Reijnen

    #2
    Re: Win Server 2003 Config problem

    The diference between iis on xp and iis on win2k3 is the application pool
    part on win2k3, I think you have to trie to do something with that... take a
    look under which apppool your app is running and take a look at the account
    of that application pool. This account must have "run as service" and "run
    as batch job" privilege...
    Greets Clemens, still a verry strange way to deploy a application ;-)


    "Ron L" <ronl@bogus.Add ress.com> wrote in message
    news:uI35R8SjFH A.1968@TK2MSFTN GP14.phx.gbl...[color=blue]
    >I have an application that I am working on with 2 other developers. The
    >applciation uses Remoting for our calls to SQL Server. We have been
    >developing and testing against our development machines (win XP), and
    >remoting is working fine, but yesterday we attempted to install our
    >application on our shared server and we keep getting 401 - Not Authorized
    >errors whenever a remoting call is made. To get the application to the
    >server, we got all the files from Source Safe to the server, and built the
    >application locally (on the server). This created the directory we needed
    >on the server's web site. I had to manually set the directory to be its
    >own application (to mimic the setup Visual Studio had automatically created
    >on our development machines).
    >
    > In addition to the 401 error we are getting when we access the remoting
    > classes programmaticall y, we also get an error page if we try to browse to
    > the WSDL.
    >
    > Our Web.Config has the following Channels definitions:
    > <channels>
    > <identity impersonate="tr ue" />
    > <channel ref="http" useDefaultCrede ntials="true">
    > <clientProvider s>
    > <formatter ref="binary" />
    > </clientProviders >
    > </channel>
    > </channels>
    >
    > and our code includes the credentials in the channel properties:
    > _commonMdl =
    > CType(Activator .GetObject(GetT ype(ModelInterf ace.ICommonMode l), _serverURL
    > & _
    > "CommonModel.re m"),
    > ModelInterface. ICommonModel)
    > _commonChannelP rops =
    > ChannelServices .GetChannelSink Properties(_com monMdl)
    > _commonChannelP rops("credentia ls") = CredentialCache .DefaultCredent ials
    >
    > I assume that, since the code works on the XP development machines, the
    > problem must be a configuration problem with the Win2k3 server/IIS6. Can
    > anyone point me to where the problem may be? I have been searching MS and
    > Google for 2 days without finding anything that appears to be relevant.
    >
    > TIA
    > Ron L
    >
    >[/color]


    Comment

    • Ron L

      #3
      Re: Win Server 2003 Config problem

      Clemens

      Thank you for the response. We are running as the DefaultAppPool, which is
      set to use the NetworkService login. We tried changing the login to
      Administrator, which has those rights explicitly granted, but got the same
      results - Not Authorized. Do you have any other thoughts?

      Ron L


      "Clemens Reijnen" <ClemensReijnen @hotmail.com> wrote in message
      news:uh3EUvdjFH A.2644@TK2MSFTN GP09.phx.gbl...[color=blue]
      > The diference between iis on xp and iis on win2k3 is the application pool
      > part on win2k3, I think you have to trie to do something with that... take
      > a look under which apppool your app is running and take a look at the
      > account of that application pool. This account must have "run as service"
      > and "run as batch job" privilege...
      > Greets Clemens, still a verry strange way to deploy a application ;-)
      >
      >
      > "Ron L" <ronl@bogus.Add ress.com> wrote in message
      > news:uI35R8SjFH A.1968@TK2MSFTN GP14.phx.gbl...[color=green]
      >>I have an application that I am working on with 2 other developers. The
      >>applciation uses Remoting for our calls to SQL Server. We have been
      >>developing and testing against our development machines (win XP), and
      >>remoting is working fine, but yesterday we attempted to install our
      >>application on our shared server and we keep getting 401 - Not Authorized
      >>errors whenever a remoting call is made. To get the application to the
      >>server, we got all the files from Source Safe to the server, and built the
      >>application locally (on the server). This created the directory we needed
      >>on the server's web site. I had to manually set the directory to be its
      >>own application (to mimic the setup Visual Studio had automatically
      >>created on our development machines).
      >>
      >> In addition to the 401 error we are getting when we access the remoting
      >> classes programmaticall y, we also get an error page if we try to browse
      >> to the WSDL.
      >>
      >> Our Web.Config has the following Channels definitions:
      >> <channels>
      >> <identity impersonate="tr ue" />
      >> <channel ref="http" useDefaultCrede ntials="true">
      >> <clientProvider s>
      >> <formatter ref="binary" />
      >> </clientProviders >
      >> </channel>
      >> </channels>
      >>
      >> and our code includes the credentials in the channel properties:
      >> _commonMdl =
      >> CType(Activator .GetObject(GetT ype(ModelInterf ace.ICommonMode l),
      >> _serverURL & _
      >> "CommonModel.re m"),
      >> ModelInterface. ICommonModel)
      >> _commonChannelP rops =
      >> ChannelServices .GetChannelSink Properties(_com monMdl)
      >> _commonChannelP rops("credentia ls") = CredentialCache .DefaultCredent ials
      >>
      >> I assume that, since the code works on the XP development machines, the
      >> problem must be a configuration problem with the Win2k3 server/IIS6. Can
      >> anyone point me to where the problem may be? I have been searching MS
      >> and Google for 2 days without finding anything that appears to be
      >> relevant.
      >>
      >> TIA
      >> Ron L
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • m.posseth

        #4
        Re: Win Server 2003 Config problem

        hmmm well this sounds verry strange

        I am a enterprise developer and i even code my remoting projects on windows
        2003 server 64 bit ,,, never had anny problems with it i did not have to
        performe anny changes to my standard windows 2003 installation to get my
        remoting projects running ...


        to get a remoting project running on IIS you need the following

        1 You must create a virtual directory
        2 You must use the http channel ( you are free to use the binarry
        formatter )
        3 You must use singlecall objects
        4 you may not specify a port ( IIS manager handless this , typicly port
        80 )
        5 the object URI must end with .rem or soap

        Configuring a remote object under IIS should be simple all you need to do is
        copying your remote assembly to the \Bin subdirectory of a virtual
        directory on the server , alternatively
        you can place it in the GAC then you need to create a configuarion file for
        the web application and advantage for this aproach is that the remote object
        also gains the ability to use IIS authentication features ( like SSL ) and
        the builtin ASP.net objects .

        in both situations the virtual directory name automaticly becomes the
        application name

        so virtual directory



        becomes the full uri for your object



        well i hope this helps in solving your problem

        regards

        Happy coding :-)

        Michel Posseth [MCP]




        "Ron L" <ronl@bogus.Add ress.com> wrote in message
        news:uK%23rJwej FHA.3608@TK2MSF TNGP12.phx.gbl. ..[color=blue]
        > Clemens
        >
        > Thank you for the response. We are running as the DefaultAppPool, which
        > is set to use the NetworkService login. We tried changing the login to
        > Administrator, which has those rights explicitly granted, but got the same
        > results - Not Authorized. Do you have any other thoughts?
        >
        > Ron L
        >
        >
        > "Clemens Reijnen" <ClemensReijnen @hotmail.com> wrote in message
        > news:uh3EUvdjFH A.2644@TK2MSFTN GP09.phx.gbl...[color=green]
        >> The diference between iis on xp and iis on win2k3 is the application pool
        >> part on win2k3, I think you have to trie to do something with that...
        >> take a look under which apppool your app is running and take a look at
        >> the account of that application pool. This account must have "run as
        >> service" and "run as batch job" privilege...
        >> Greets Clemens, still a verry strange way to deploy a application ;-)
        >>
        >>
        >> "Ron L" <ronl@bogus.Add ress.com> wrote in message
        >> news:uI35R8SjFH A.1968@TK2MSFTN GP14.phx.gbl...[color=darkred]
        >>>I have an application that I am working on with 2 other developers. The
        >>>applciatio n uses Remoting for our calls to SQL Server. We have been
        >>>developing and testing against our development machines (win XP), and
        >>>remoting is working fine, but yesterday we attempted to install our
        >>>applicatio n on our shared server and we keep getting 401 - Not Authorized
        >>>errors whenever a remoting call is made. To get the application to the
        >>>server, we got all the files from Source Safe to the server, and built
        >>>the application locally (on the server). This created the directory we
        >>>needed on the server's web site. I had to manually set the directory to
        >>>be its own application (to mimic the setup Visual Studio had
        >>>automaticall y created on our development machines).
        >>>
        >>> In addition to the 401 error we are getting when we access the remoting
        >>> classes programmaticall y, we also get an error page if we try to browse
        >>> to the WSDL.
        >>>
        >>> Our Web.Config has the following Channels definitions:
        >>> <channels>
        >>> <identity impersonate="tr ue" />
        >>> <channel ref="http" useDefaultCrede ntials="true">
        >>> <clientProvider s>
        >>> <formatter ref="binary" />
        >>> </clientProviders >
        >>> </channel>
        >>> </channels>
        >>>
        >>> and our code includes the credentials in the channel properties:
        >>> _commonMdl =
        >>> CType(Activator .GetObject(GetT ype(ModelInterf ace.ICommonMode l),
        >>> _serverURL & _
        >>> "CommonModel.re m"),
        >>> ModelInterface. ICommonModel)
        >>> _commonChannelP rops =
        >>> ChannelServices .GetChannelSink Properties(_com monMdl)
        >>> _commonChannelP rops("credentia ls") =
        >>> CredentialCache .DefaultCredent ials
        >>>
        >>> I assume that, since the code works on the XP development machines, the
        >>> problem must be a configuration problem with the Win2k3 server/IIS6.
        >>> Can anyone point me to where the problem may be? I have been searching
        >>> MS and Google for 2 days without finding anything that appears to be
        >>> relevant.
        >>>
        >>> TIA
        >>> Ron L
        >>>
        >>>[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        Working...