Howto: WebService in not Bin folder?

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

    Howto: WebService in not Bin folder?

    Hello.
    I have simple web folders structure:
    -ROOT
    - BIN
    WebService.dll
    WebService.asmx

    I need to use my WebService.dll not in bin folder - for example, in ROOT.
    How do i this?
    How can i do this without .config file only with some configuration
    object/class? I need this for prevent access locally to text file - i want
    to do this only in binary! How is it possible?
    Where can i get information about this with examples?

    Thank you.


  • Dan Rogers

    #2
    RE: Howto: WebService in not Bin folder?

    It's not clear to me what you are trying to do. Where is this text file
    you want to not allow access to? How will moving the DLL change this?

    The path to the DLL (the web service implementation) is referenced in the
    asmx file. Simply change it to suit.

    I hope this helps ... even if It's not clear to me what the issue is.

    Regards

    Dan Rogers
    Microsoft Corporation
    --------------------
    Reply-To: "Topper" <alexander.rode nkov@bix.ru>
    From: "Topper" <alexander.rode nkov@bix.ru>
    Subject: Howto: WebService in not Bin folder?
    Date: Tue, 14 Dec 2004 16:33:55 +0300
    Lines: 17
    Organization: BIX
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
    Message-ID: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
    Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
    NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
    Path:
    cpmsftngxa10.ph x.gbl!TK2MSFTNG XA06.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8
    .phx.gbl!TK2MSF TNGP15.phx.gbl
    Xref: cpmsftngxa10.ph x.gbl
    microsoft.publi c.dotnet.framew ork.webservices :8069
    X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

    Hello.
    I have simple web folders structure:
    -ROOT
    - BIN
    WebService.dll
    WebService.asmx

    I need to use my WebService.dll not in bin folder - for example, in ROOT.
    How do i this?
    How can i do this without .config file only with some configuration
    object/class? I need this for prevent access locally to text file - i want
    to do this only in binary! How is it possible?
    Where can i get information about this with examples?

    Thank you.



    Comment

    • Topper

      #3
      Re: Howto: WebService in not Bin folder?

      ASMX file has definition(asse mbly name) of my WebService object for
      ASP.NET.
      ASP.NET searching my WebService assembly in bin folder (by default it
      defined in machine.config file)

      But if i place my WebService dll not in bin folder ASP.NET cann't found it
      and error occured.
      MSDN describe how can i configure my WebService for new place (not bin
      folder, for example) - using tags <codebase>, ... etc. - but in my case it
      doesn't work absolutly (i'm trying to understood why)
      This configurations placed in web.config file in the same folder as my Web
      application - this text file i want to prevent for local use.
      My question is: can i configure my WebService without using web.config -
      only using object/class model?
      And where can i get examples?

      Thank You.



      "Dan Rogers" <danro@microsof t.com> wrote in message
      news:fIg1b6j4EH A.3744@cpmsftng xa10.phx.gbl...[color=blue]
      > It's not clear to me what you are trying to do. Where is this text file
      > you want to not allow access to? How will moving the DLL change this?
      >
      > The path to the DLL (the web service implementation) is referenced in the
      > asmx file. Simply change it to suit.
      >
      > I hope this helps ... even if It's not clear to me what the issue is.
      >
      > Regards
      >
      > Dan Rogers
      > Microsoft Corporation
      > --------------------
      > Reply-To: "Topper" <alexander.rode nkov@bix.ru>
      > From: "Topper" <alexander.rode nkov@bix.ru>
      > Subject: Howto: WebService in not Bin folder?
      > Date: Tue, 14 Dec 2004 16:33:55 +0300
      > Lines: 17
      > Organization: BIX
      > X-Priority: 3
      > X-MSMail-Priority: Normal
      > X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
      > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
      > Message-ID: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
      > Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
      > NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
      > Path:
      >[/color]
      cpmsftngxa10.ph x.gbl!TK2MSFTNG XA06.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8[color=blue]
      > phx.gbl!TK2MSFT NGP15.phx.gbl
      > Xref: cpmsftngxa10.ph x.gbl
      > microsoft.publi c.dotnet.framew ork.webservices :8069
      > X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
      >
      > Hello.
      > I have simple web folders structure:
      > -ROOT
      > - BIN
      > WebService.dll
      > WebService.asmx
      >
      > I need to use my WebService.dll not in bin folder - for example, in ROOT.
      > How do i this?
      > How can i do this without .config file only with some configuration
      > object/class? I need this for prevent access locally to text file - i want
      > to do this only in binary! How is it possible?
      > Where can i get information about this with examples?
      >
      > Thank you.
      >
      >
      >[/color]


      Comment

      • Mujtaba Syed

        #4
        Re: Howto: WebService in not Bin folder?

        Hi Topper:
        [color=blue]
        > ASMX file has definition(asse mbly name) of my WebService object for
        > ASP.NET.
        > ASP.NET searching my WebService assembly in bin folder (by default it
        > defined in machine.config file)
        > But if i place my WebService dll not in bin folder ASP.NET cann't found it
        > and error occured.[/color]

        If you use Visual Studio .NET, it breaks your web service into two parts, a
        ..ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
        CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
        the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
        folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
        (reference in the URL), it sees the INHERITS attribute and compiles a
        temporary class by inheriting the codebehind class from the DLL. So, /BIN is
        just the default probing path to lookup assemblies. And since you don't want
        to configure alternative probing paths in web.config, you problem can be
        solved by not using a codebehind at all. Put all your code in .ASMX and be
        done with!

        Mujtaba.


        Comment

        • Topper

          #5
          Re: Howto: WebService in not Bin folder?

          I'm trying to use webservice business logic only in binary file (dll ) and
          asmx-file using for it is not good idea.


          "Mujtaba Syed" <mujtaba@marlab s.com> wrote in message
          news:OC8s5Gs4EH A.824@TK2MSFTNG P11.phx.gbl...[color=blue]
          > Hi Topper:
          >[color=green]
          > > ASMX file has definition(asse mbly name) of my WebService object for
          > > ASP.NET.
          > > ASP.NET searching my WebService assembly in bin folder (by default it
          > > defined in machine.config file)
          > > But if i place my WebService dll not in bin folder ASP.NET cann't found[/color][/color]
          it[color=blue][color=green]
          > > and error occured.[/color]
          >
          > If you use Visual Studio .NET, it breaks your web service into two parts,[/color]
          a[color=blue]
          > .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
          > CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
          > the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
          > folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
          > (reference in the URL), it sees the INHERITS attribute and compiles a
          > temporary class by inheriting the codebehind class from the DLL. So, /BIN[/color]
          is[color=blue]
          > just the default probing path to lookup assemblies. And since you don't[/color]
          want[color=blue]
          > to configure alternative probing paths in web.config, you problem can be
          > solved by not using a codebehind at all. Put all your code in .ASMX and be
          > done with!
          >
          > Mujtaba.
          >
          >[/color]


          Comment

          • Dan Rogers

            #6
            Re: Howto: WebService in not Bin folder?

            Hi Alexander,

            Could you be clearer about what the problem is? Why is the Bin directory
            something you don't like? And what text file is it that you think there is
            an issue for? What is that issue?

            Dan
            --------------------
            Reply-To: "Topper" <alexander.rode nkov@bix.ru>
            From: "Topper" <alexander.rode nkov@bix.ru>
            References: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
            <fIg1b6j4EHA.37 44@cpmsftngxa10 .phx.gbl>
            <e4hSfgo4EHA.25 40@TK2MSFTNGP09 .phx.gbl>
            <OC8s5Gs4EHA.82 4@TK2MSFTNGP11. phx.gbl>
            Subject: Re: Howto: WebService in not Bin folder?
            Date: Thu, 16 Dec 2004 11:03:26 +0300
            Lines: 36
            Organization: BIX
            X-Priority: 3
            X-MSMail-Priority: Normal
            X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
            X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
            Message-ID: <epFxrW04EHA.15 64@TK2MSFTNGP09 .phx.gbl>
            Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
            NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
            Path:
            cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9
            .phx.gbl
            Xref: cpmsftngxa10.ph x.gbl
            microsoft.publi c.dotnet.framew ork.webservices :8126
            X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

            I'm trying to use webservice business logic only in binary file (dll ) and
            asmx-file using for it is not good idea.


            "Mujtaba Syed" <mujtaba@marlab s.com> wrote in message
            news:OC8s5Gs4EH A.824@TK2MSFTNG P11.phx.gbl...[color=blue]
            > Hi Topper:
            >[color=green]
            > > ASMX file has definition(asse mbly name) of my WebService object for
            > > ASP.NET.
            > > ASP.NET searching my WebService assembly in bin folder (by default it
            > > defined in machine.config file)
            > > But if i place my WebService dll not in bin folder ASP.NET cann't found[/color][/color]
            it[color=blue][color=green]
            > > and error occured.[/color]
            >
            > If you use Visual Studio .NET, it breaks your web service into two parts,[/color]
            a[color=blue]
            > .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
            > CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
            > the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
            > folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
            > (reference in the URL), it sees the INHERITS attribute and compiles a
            > temporary class by inheriting the codebehind class from the DLL. So, /BIN[/color]
            is[color=blue]
            > just the default probing path to lookup assemblies. And since you don't[/color]
            want[color=blue]
            > to configure alternative probing paths in web.config, you problem can be
            > solved by not using a codebehind at all. Put all your code in .ASMX and be
            > done with!
            >
            > Mujtaba.
            >
            >[/color]



            Comment

            • Topper

              #7
              Re: Howto: WebService in not Bin folder?

              Ok.
              I've develop project for PDA terminals. There're two components - server
              (PC) and PDA-client(s).
              My project is a part of another commertial solution and used as
              internet/intranet solution. But it is not Internet application.

              The one of common goals of my project sounds like this:
              (!)Server part must be as a black box ("pandora box") - it must be prevent
              for any changes and customisations 'cause
              it planned to use as a commertial platform for another terminal clients
              development(!).

              Compact framework supports only two ways for data exchange between client
              and server (as i know) - one is Messaging (using SOAP/XML messages exchange
              over HTTP or TCP). The second is webservices. I've choose second 'cause it
              is a simply to use, development, flexible and simply for any enhancements.
              The first one is hardly scalable and flexible because i must to declare any
              SOAP/XML request and response (messages) for client and server.

              I'd choose WebService technology for my solution.
              But i have one problem - i must not use IIS server (it concerned with
              services of another solution parts - i cann't change its logic) .
              And i've develop my own web server for hosting own WebServices (i've seen
              Cassini Web server sample).

              And now i have two problems that i want to solve:
              1.My WebService and Web Server use the same assemblies (for example,
              core.dll, common.dll etc.) and i have to place its to BIN folder(for
              websercvices) and ROOT (for webServer and HTTP handler like asmx-file ) - it
              is not good idea, imho.
              2. Because this solution is for commertial use, i need to prevent it for any
              cases of customisations( hacking, unlicense usage, etc.). The common way is
              to prevent any customisations in asmx-files because these files is TEXT
              files and its use inside description of codebehind assemblies. Some"bad man"
              (hacker, employee, etc.) can write own webservice as mine and path it in
              asmx-file instead mine assemply. In this case he takes access to any
              information that PDA exchanges to Server - it can be security info like
              credit cards info or some private information.

              To solving these problems i found in MSDN that i can configure my web
              service using .config file.
              For one i must use <codebase> or <probing> tags in my .config file.
              For second i must create my own IHTTPHandler-class instead asmx-file and
              describe it as handler in .config file using <<httpHandler s> tag.
              But .config file is also TEXT file and it can be customised by somebody also
              (like asmx file) =((

              And i have two questions:
              1. How can i configure my ASP.NET applications without .config file - only
              using some class or object? Maybe i may to secure .config file or place it
              into some dll-resources?
              2. How can i change default place for my WebServices (BIN-folder)? (It is
              not primary goal but i'd describe above why i don't want to divide
              WebServer, HTTP-handlers and WebServices dll-files to different folders)

              And how can i secure my ASP.NET solution for any LOCAL customisations (any
              text file like .config and asmx files)?

              May anybody answer me how?

              Alexander.


              "Dan Rogers" <danro@microsof t.com> wrote in message
              news:vaakEA74EH A.3440@cpmsftng xa10.phx.gbl...[color=blue]
              > Hi Alexander,
              >
              > Could you be clearer about what the problem is? Why is the Bin directory
              > something you don't like? And what text file is it that you think there[/color]
              is[color=blue]
              > an issue for? What is that issue?
              >
              > Dan
              > --------------------
              > Reply-To: "Topper" <alexander.rode nkov@bix.ru>
              > From: "Topper" <alexander.rode nkov@bix.ru>
              > References: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
              > <fIg1b6j4EHA.37 44@cpmsftngxa10 .phx.gbl>
              > <e4hSfgo4EHA.25 40@TK2MSFTNGP09 .phx.gbl>
              > <OC8s5Gs4EHA.82 4@TK2MSFTNGP11. phx.gbl>
              > Subject: Re: Howto: WebService in not Bin folder?
              > Date: Thu, 16 Dec 2004 11:03:26 +0300
              > Lines: 36
              > Organization: BIX
              > X-Priority: 3
              > X-MSMail-Priority: Normal
              > X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
              > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
              > Message-ID: <epFxrW04EHA.15 64@TK2MSFTNGP09 .phx.gbl>
              > Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
              > NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
              > Path:
              >[/color]
              cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9[color=blue]
              > phx.gbl
              > Xref: cpmsftngxa10.ph x.gbl
              > microsoft.publi c.dotnet.framew ork.webservices :8126
              > X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
              >
              > I'm trying to use webservice business logic only in binary file (dll ) and
              > asmx-file using for it is not good idea.
              >
              >
              > "Mujtaba Syed" <mujtaba@marlab s.com> wrote in message
              > news:OC8s5Gs4EH A.824@TK2MSFTNG P11.phx.gbl...[color=green]
              > > Hi Topper:
              > >[color=darkred]
              > > > ASMX file has definition(asse mbly name) of my WebService object for
              > > > ASP.NET.
              > > > ASP.NET searching my WebService assembly in bin folder (by default it
              > > > defined in machine.config file)
              > > > But if i place my WebService dll not in bin folder ASP.NET cann't[/color][/color][/color]
              found[color=blue]
              > it[color=green][color=darkred]
              > > > and error occured.[/color]
              > >
              > > If you use Visual Studio .NET, it breaks your web service into two[/color][/color]
              parts,[color=blue]
              > a[color=green]
              > > .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
              > > CODEBEHIND attribute in the .ASMX file. Now when you compile your[/color][/color]
              project,[color=blue][color=green]
              > > the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
              > > folder under your VROOT. When the ASP.NET runtime is serving an .ASMX[/color][/color]
              file[color=blue][color=green]
              > > (reference in the URL), it sees the INHERITS attribute and compiles a
              > > temporary class by inheriting the codebehind class from the DLL. So,[/color][/color]
              /BIN[color=blue]
              > is[color=green]
              > > just the default probing path to lookup assemblies. And since you don't[/color]
              > want[color=green]
              > > to configure alternative probing paths in web.config, you problem can be
              > > solved by not using a codebehind at all. Put all your code in .ASMX and[/color][/color]
              be[color=blue][color=green]
              > > done with!
              > >
              > > Mujtaba.
              > >
              > >[/color]
              >
              >
              >[/color]


              Comment

              • Dan Rogers

                #8
                Re: Howto: WebService in not Bin folder?

                Hi Alexander,

                Wow. Wow. Holy wow.

                I wish I'd known eaarlier that you were not talking about ASP.net web
                services - we could have saved a lot of time.

                Since you have developed your own web server and your own web service
                stack, there is very little you can gain, in my opinion, from reading about
                how IIS hosted web services function and are controlled. Unless you
                duplicated exactly the functionality and design/configuration of ASP.net,
                nothing I can tell you about how to do something with the Microsoft ASP.net
                implementation would apply to your own private code base.

                The best I can tell you is to look at your code, your own designs, and then
                see if you have provided the kind of control you desire. I can't comment
                on your implementation, or on the cassini example.

                I wish you luck,

                Dan Rogers
                Microsoft Corporation
                --------------------
                Reply-To: "Topper" <alexander.rode nkov@bix.ru>
                From: "Topper" <alexander.rode nkov@bix.ru>
                References: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
                <fIg1b6j4EHA.37 44@cpmsftngxa10 .phx.gbl>
                <e4hSfgo4EHA.25 40@TK2MSFTNGP09 .phx.gbl>
                <OC8s5Gs4EHA.82 4@TK2MSFTNGP11. phx.gbl>
                <epFxrW04EHA.15 64@TK2MSFTNGP09 .phx.gbl>
                <vaakEA74EHA.34 40@cpmsftngxa10 .phx.gbl>
                Subject: Re: Howto: WebService in not Bin folder?
                Date: Fri, 17 Dec 2004 15:35:50 +0300
                Lines: 144
                Organization: BIX
                X-Priority: 3
                X-MSMail-Priority: Normal
                X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
                X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
                Message-ID: <OvSZjTD5EHA.21 80@TK2MSFTNGP10 .phx.gbl>
                Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
                NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
                Path:
                cpmsftngxa10.ph x.gbl!TK2MSFTNG XS01.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8
                .phx.gbl!TK2MSF TNGP10.phx.gbl
                Xref: cpmsftngxa10.ph x.gbl
                microsoft.publi c.dotnet.framew ork.webservices :8165
                X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

                Ok.
                I've develop project for PDA terminals. There're two components - server
                (PC) and PDA-client(s).
                My project is a part of another commertial solution and used as
                internet/intranet solution. But it is not Internet application.

                The one of common goals of my project sounds like this:
                (!)Server part must be as a black box ("pandora box") - it must be prevent
                for any changes and customisations 'cause
                it planned to use as a commertial platform for another terminal clients
                development(!).

                Compact framework supports only two ways for data exchange between client
                and server (as i know) - one is Messaging (using SOAP/XML messages exchange
                over HTTP or TCP). The second is webservices. I've choose second 'cause it
                is a simply to use, development, flexible and simply for any enhancements.
                The first one is hardly scalable and flexible because i must to declare any
                SOAP/XML request and response (messages) for client and server.

                I'd choose WebService technology for my solution.
                But i have one problem - i must not use IIS server (it concerned with
                services of another solution parts - i cann't change its logic) .
                And i've develop my own web server for hosting own WebServices (i've seen
                Cassini Web server sample).

                And now i have two problems that i want to solve:
                1.My WebService and Web Server use the same assemblies (for example,
                core.dll, common.dll etc.) and i have to place its to BIN folder(for
                websercvices) and ROOT (for webServer and HTTP handler like asmx-file ) - it
                is not good idea, imho.
                2. Because this solution is for commertial use, i need to prevent it for any
                cases of customisations( hacking, unlicense usage, etc.). The common way is
                to prevent any customisations in asmx-files because these files is TEXT
                files and its use inside description of codebehind assemblies. Some"bad man"
                (hacker, employee, etc.) can write own webservice as mine and path it in
                asmx-file instead mine assemply. In this case he takes access to any
                information that PDA exchanges to Server - it can be security info like
                credit cards info or some private information.

                To solving these problems i found in MSDN that i can configure my web
                service using .config file.
                For one i must use <codebase> or <probing> tags in my .config file.
                For second i must create my own IHTTPHandler-class instead asmx-file and
                describe it as handler in .config file using <<httpHandler s> tag.
                But .config file is also TEXT file and it can be customised by somebody also
                (like asmx file) =((

                And i have two questions:
                1. How can i configure my ASP.NET applications without .config file - only
                using some class or object? Maybe i may to secure .config file or place it
                into some dll-resources?
                2. How can i change default place for my WebServices (BIN-folder)? (It is
                not primary goal but i'd describe above why i don't want to divide
                WebServer, HTTP-handlers and WebServices dll-files to different folders)

                And how can i secure my ASP.NET solution for any LOCAL customisations (any
                text file like .config and asmx files)?

                May anybody answer me how?

                Alexander.


                "Dan Rogers" <danro@microsof t.com> wrote in message
                news:vaakEA74EH A.3440@cpmsftng xa10.phx.gbl...[color=blue]
                > Hi Alexander,
                >
                > Could you be clearer about what the problem is? Why is the Bin directory
                > something you don't like? And what text file is it that you think there[/color]
                is[color=blue]
                > an issue for? What is that issue?
                >
                > Dan
                > --------------------
                > Reply-To: "Topper" <alexander.rode nkov@bix.ru>
                > From: "Topper" <alexander.rode nkov@bix.ru>
                > References: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
                > <fIg1b6j4EHA.37 44@cpmsftngxa10 .phx.gbl>
                > <e4hSfgo4EHA.25 40@TK2MSFTNGP09 .phx.gbl>
                > <OC8s5Gs4EHA.82 4@TK2MSFTNGP11. phx.gbl>
                > Subject: Re: Howto: WebService in not Bin folder?
                > Date: Thu, 16 Dec 2004 11:03:26 +0300
                > Lines: 36
                > Organization: BIX
                > X-Priority: 3
                > X-MSMail-Priority: Normal
                > X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
                > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
                > Message-ID: <epFxrW04EHA.15 64@TK2MSFTNGP09 .phx.gbl>
                > Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
                > NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
                > Path:
                >[/color]
                cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9[color=blue]
                > phx.gbl
                > Xref: cpmsftngxa10.ph x.gbl
                > microsoft.publi c.dotnet.framew ork.webservices :8126
                > X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
                >
                > I'm trying to use webservice business logic only in binary file (dll ) and
                > asmx-file using for it is not good idea.
                >
                >
                > "Mujtaba Syed" <mujtaba@marlab s.com> wrote in message
                > news:OC8s5Gs4EH A.824@TK2MSFTNG P11.phx.gbl...[color=green]
                > > Hi Topper:
                > >[color=darkred]
                > > > ASMX file has definition(asse mbly name) of my WebService object for
                > > > ASP.NET.
                > > > ASP.NET searching my WebService assembly in bin folder (by default it
                > > > defined in machine.config file)
                > > > But if i place my WebService dll not in bin folder ASP.NET cann't[/color][/color][/color]
                found[color=blue]
                > it[color=green][color=darkred]
                > > > and error occured.[/color]
                > >
                > > If you use Visual Studio .NET, it breaks your web service into two[/color][/color]
                parts,[color=blue]
                > a[color=green]
                > > .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
                > > CODEBEHIND attribute in the .ASMX file. Now when you compile your[/color][/color]
                project,[color=blue][color=green]
                > > the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
                > > folder under your VROOT. When the ASP.NET runtime is serving an .ASMX[/color][/color]
                file[color=blue][color=green]
                > > (reference in the URL), it sees the INHERITS attribute and compiles a
                > > temporary class by inheriting the codebehind class from the DLL. So,[/color][/color]
                /BIN[color=blue]
                > is[color=green]
                > > just the default probing path to lookup assemblies. And since you don't[/color]
                > want[color=green]
                > > to configure alternative probing paths in web.config, you problem can be
                > > solved by not using a codebehind at all. Put all your code in .ASMX and[/color][/color]
                be[color=blue][color=green]
                > > done with!
                > >
                > > Mujtaba.
                > >
                > >[/color]
                >
                >
                >[/color]



                Comment

                • Topper

                  #9
                  Re: Howto: WebService in not Bin folder?

                  Hello, Dan

                  I've found decision - befor my application starts check and add tags to
                  "machin.con fig" every time. It is a simply.

                  Thanks.



                  "Dan Rogers" <danro@microsof t.com> wrote in message
                  news:CBB$E8t5EH A.3512@cpmsftng xa10.phx.gbl...[color=blue]
                  > Hi Alexander,
                  >
                  > Wow. Wow. Holy wow.
                  >
                  > I wish I'd known eaarlier that you were not talking about ASP.net web
                  > services - we could have saved a lot of time.
                  >
                  > Since you have developed your own web server and your own web service
                  > stack, there is very little you can gain, in my opinion, from reading[/color]
                  about[color=blue]
                  > how IIS hosted web services function and are controlled. Unless you
                  > duplicated exactly the functionality and design/configuration of ASP.net,
                  > nothing I can tell you about how to do something with the Microsoft[/color]
                  ASP.net[color=blue]
                  > implementation would apply to your own private code base.
                  >
                  > The best I can tell you is to look at your code, your own designs, and[/color]
                  then[color=blue]
                  > see if you have provided the kind of control you desire. I can't comment
                  > on your implementation, or on the cassini example.
                  >
                  > I wish you luck,
                  >
                  > Dan Rogers
                  > Microsoft Corporation
                  > --------------------
                  > Reply-To: "Topper" <alexander.rode nkov@bix.ru>
                  > From: "Topper" <alexander.rode nkov@bix.ru>
                  > References: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
                  > <fIg1b6j4EHA.37 44@cpmsftngxa10 .phx.gbl>
                  > <e4hSfgo4EHA.25 40@TK2MSFTNGP09 .phx.gbl>
                  > <OC8s5Gs4EHA.82 4@TK2MSFTNGP11. phx.gbl>
                  > <epFxrW04EHA.15 64@TK2MSFTNGP09 .phx.gbl>
                  > <vaakEA74EHA.34 40@cpmsftngxa10 .phx.gbl>
                  > Subject: Re: Howto: WebService in not Bin folder?
                  > Date: Fri, 17 Dec 2004 15:35:50 +0300
                  > Lines: 144
                  > Organization: BIX
                  > X-Priority: 3
                  > X-MSMail-Priority: Normal
                  > X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
                  > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
                  > Message-ID: <OvSZjTD5EHA.21 80@TK2MSFTNGP10 .phx.gbl>
                  > Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
                  > NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
                  > Path:
                  >[/color]
                  cpmsftngxa10.ph x.gbl!TK2MSFTNG XS01.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8[color=blue]
                  > phx.gbl!TK2MSFT NGP10.phx.gbl
                  > Xref: cpmsftngxa10.ph x.gbl
                  > microsoft.publi c.dotnet.framew ork.webservices :8165
                  > X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
                  >
                  > Ok.
                  > I've develop project for PDA terminals. There're two components - server
                  > (PC) and PDA-client(s).
                  > My project is a part of another commertial solution and used as
                  > internet/intranet solution. But it is not Internet application.
                  >
                  > The one of common goals of my project sounds like this:
                  > (!)Server part must be as a black box ("pandora box") - it must be prevent
                  > for any changes and customisations 'cause
                  > it planned to use as a commertial platform for another terminal clients
                  > development(!).
                  >
                  > Compact framework supports only two ways for data exchange between client
                  > and server (as i know) - one is Messaging (using SOAP/XML messages[/color]
                  exchange[color=blue]
                  > over HTTP or TCP). The second is webservices. I've choose second 'cause it
                  > is a simply to use, development, flexible and simply for any[/color]
                  enhancements.[color=blue]
                  > The first one is hardly scalable and flexible because i must to declare[/color]
                  any[color=blue]
                  > SOAP/XML request and response (messages) for client and server.
                  >
                  > I'd choose WebService technology for my solution.
                  > But i have one problem - i must not use IIS server (it concerned with
                  > services of another solution parts - i cann't change its logic) .
                  > And i've develop my own web server for hosting own WebServices (i've seen
                  > Cassini Web server sample).
                  >
                  > And now i have two problems that i want to solve:
                  > 1.My WebService and Web Server use the same assemblies (for example,
                  > core.dll, common.dll etc.) and i have to place its to BIN folder(for
                  > websercvices) and ROOT (for webServer and HTTP handler like asmx-file ) -[/color]
                  it[color=blue]
                  > is not good idea, imho.
                  > 2. Because this solution is for commertial use, i need to prevent it for[/color]
                  any[color=blue]
                  > cases of customisations( hacking, unlicense usage, etc.). The common way[/color]
                  is[color=blue]
                  > to prevent any customisations in asmx-files because these files is TEXT
                  > files and its use inside description of codebehind assemblies. Some"bad[/color]
                  man"[color=blue]
                  > (hacker, employee, etc.) can write own webservice as mine and path it in
                  > asmx-file instead mine assemply. In this case he takes access to any
                  > information that PDA exchanges to Server - it can be security info like
                  > credit cards info or some private information.
                  >
                  > To solving these problems i found in MSDN that i can configure my web
                  > service using .config file.
                  > For one i must use <codebase> or <probing> tags in my .config file.
                  > For second i must create my own IHTTPHandler-class instead asmx-file and
                  > describe it as handler in .config file using <<httpHandler s> tag.
                  > But .config file is also TEXT file and it can be customised by somebody[/color]
                  also[color=blue]
                  > (like asmx file) =((
                  >
                  > And i have two questions:
                  > 1. How can i configure my ASP.NET applications without .config file - only
                  > using some class or object? Maybe i may to secure .config file or place it
                  > into some dll-resources?
                  > 2. How can i change default place for my WebServices (BIN-folder)? (It is
                  > not primary goal but i'd describe above why i don't want to divide
                  > WebServer, HTTP-handlers and WebServices dll-files to different folders)
                  >
                  > And how can i secure my ASP.NET solution for any LOCAL customisations (any
                  > text file like .config and asmx files)?
                  >
                  > May anybody answer me how?
                  >
                  > Alexander.
                  >
                  >
                  > "Dan Rogers" <danro@microsof t.com> wrote in message
                  > news:vaakEA74EH A.3440@cpmsftng xa10.phx.gbl...[color=green]
                  > > Hi Alexander,
                  > >
                  > > Could you be clearer about what the problem is? Why is the Bin[/color][/color]
                  directory[color=blue][color=green]
                  > > something you don't like? And what text file is it that you think there[/color]
                  > is[color=green]
                  > > an issue for? What is that issue?
                  > >
                  > > Dan
                  > > --------------------
                  > > Reply-To: "Topper" <alexander.rode nkov@bix.ru>
                  > > From: "Topper" <alexander.rode nkov@bix.ru>
                  > > References: <#$DjCGe4EHA.28 04@TK2MSFTNGP15 .phx.gbl>
                  > > <fIg1b6j4EHA.37 44@cpmsftngxa10 .phx.gbl>
                  > > <e4hSfgo4EHA.25 40@TK2MSFTNGP09 .phx.gbl>
                  > > <OC8s5Gs4EHA.82 4@TK2MSFTNGP11. phx.gbl>
                  > > Subject: Re: Howto: WebService in not Bin folder?
                  > > Date: Thu, 16 Dec 2004 11:03:26 +0300
                  > > Lines: 36
                  > > Organization: BIX
                  > > X-Priority: 3
                  > > X-MSMail-Priority: Normal
                  > > X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
                  > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
                  > > Message-ID: <epFxrW04EHA.15 64@TK2MSFTNGP09 .phx.gbl>
                  > > Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
                  > > NNTP-Posting-Host: biks.rmt.ru 213.252.119.58
                  > > Path:
                  > >[/color]
                  >[/color]
                  cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9[color=blue][color=green]
                  > > phx.gbl
                  > > Xref: cpmsftngxa10.ph x.gbl
                  > > microsoft.publi c.dotnet.framew ork.webservices :8126
                  > > X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
                  > >
                  > > I'm trying to use webservice business logic only in binary file (dll )[/color][/color]
                  and[color=blue][color=green]
                  > > asmx-file using for it is not good idea.
                  > >
                  > >
                  > > "Mujtaba Syed" <mujtaba@marlab s.com> wrote in message
                  > > news:OC8s5Gs4EH A.824@TK2MSFTNG P11.phx.gbl...[color=darkred]
                  > > > Hi Topper:
                  > > >
                  > > > > ASMX file has definition(asse mbly name) of my WebService object for
                  > > > > ASP.NET.
                  > > > > ASP.NET searching my WebService assembly in bin folder (by default[/color][/color][/color]
                  it[color=blue][color=green][color=darkred]
                  > > > > defined in machine.config file)
                  > > > > But if i place my WebService dll not in bin folder ASP.NET cann't[/color][/color]
                  > found[color=green]
                  > > it[color=darkred]
                  > > > > and error occured.
                  > > >
                  > > > If you use Visual Studio .NET, it breaks your web service into two[/color][/color]
                  > parts,[color=green]
                  > > a[color=darkred]
                  > > > .ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
                  > > > CODEBEHIND attribute in the .ASMX file. Now when you compile your[/color][/color]
                  > project,[color=green][color=darkred]
                  > > > the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
                  > > > folder under your VROOT. When the ASP.NET runtime is serving an .ASMX[/color][/color]
                  > file[color=green][color=darkred]
                  > > > (reference in the URL), it sees the INHERITS attribute and compiles a
                  > > > temporary class by inheriting the codebehind class from the DLL. So,[/color][/color]
                  > /BIN[color=green]
                  > > is[color=darkred]
                  > > > just the default probing path to lookup assemblies. And since you[/color][/color][/color]
                  don't[color=blue][color=green]
                  > > want[color=darkred]
                  > > > to configure alternative probing paths in web.config, you problem can[/color][/color][/color]
                  be[color=blue][color=green][color=darkred]
                  > > > solved by not using a codebehind at all. Put all your code in .ASMX[/color][/color][/color]
                  and[color=blue]
                  > be[color=green][color=darkred]
                  > > > done with!
                  > > >
                  > > > Mujtaba.
                  > > >
                  > > >[/color]
                  > >
                  > >
                  > >[/color]
                  >
                  >
                  >[/color]


                  Comment

                  Working...