Professional Web Applications Themes

Running XML Web Service from IIS Virtual Directory without creating application - ASP.NET Web Services

How do you run an XML Web Service from within an IIS Virtual Directory without creating an application. According to Microsoft you can do this, but I get the following error when I try to access my Web Service: Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pr Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application ...

  1. #1

    Default Running XML Web Service from IIS Virtual Directory without creating application

    How do you run an XML Web Service from within an IIS Virtual Directory
    without creating an application.

    According to Microsoft you can do this, but I get the following error
    when I try to access my Web Service:

    Description: An error occurred during the processing of a
    configuration file required to service this request. Please review the
    specific error details below and modify your configuration file
    appropriately.

    Pr Error Message: It is an error to use a section registered as
    allowDefinition='MachineToApplication' beyond application level. This
    error can be caused by a virtual directory not being configured as an
    application in IIS.


    Any ideas?

    thanks

    Ben Fidge
    Ben Fidge Guest

  2. #2

    Default Re: Running XML Web Service from IIS Virtual Directory without creating application

    I might add that the Microsoft source mentioned in my previous post is as
    follows:

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondeployingwebservices.asp[/url]

    It clearly states that the virtual directory needn't actually be an IIS
    Application. It doesn't, however, state how to implement Web Services this
    way.

    Thanks

    Ben Fidge


    "Ben Fidge" <ben.fidgebtopenworld.com> wrote in message
    news:3f2bf445.0310150637.7c25f9d9posting.google.c om...
    > How do you run an XML Web Service from within an IIS Virtual Directory
    > without creating an application.
    >
    > According to Microsoft you can do this, but I get the following error
    > when I try to access my Web Service:
    >
    > Description: An error occurred during the processing of a
    > configuration file required to service this request. Please review the
    > specific error details below and modify your configuration file
    > appropriately.
    >
    > Pr Error Message: It is an error to use a section registered as
    > allowDefinition='MachineToApplication' beyond application level. This
    > error can be caused by a virtual directory not being configured as an
    > application in IIS.
    >
    >
    > Any ideas?
    >
    > thanks
    >
    > Ben Fidge

    Ben Fidge Guest

  3. #3

    Default Running XML Web Service from IIS Virtual Directory without creating application

    That is a problem with any configuration section you
    placed inside the Web.config, that can be only defined in
    machine.config or in an application directory inside IIS.
    Look at the source error for more information. For
    example, the section "autentication" cannot be placed
    inside a Web.config file that isnīt placed in a IIS
    application directory.
    >-----Original Message-----
    >How do you run an XML Web Service from within an IIS
    Virtual Directory
    >without creating an application.
    >
    >According to Microsoft you can do this, but I get the
    following error
    >when I try to access my Web Service:
    >
    >Description: An error occurred during the processing of a
    >configuration file required to service this request.
    Please review the
    >specific error details below and modify your
    configuration file
    >appropriately.
    >
    >Pr Error Message: It is an error to use a section
    registered as
    >allowDefinition='MachineToApplication' beyond
    application level. This
    >error can be caused by a virtual directory not being
    configured as an
    >application in IIS.
    >
    >
    >Any ideas?
    >
    >thanks
    >
    >Ben Fidge
    >.
    >
    Juan Wajnerman Guest

  4. #4

    Default Running XML Web Service from IIS Virtual Directory without creating application

    Juan,

    Thanks for your help. Altough this resolved that
    particular problem, I still can't run my Web Service from
    a plain virtual directory.

    After removing the <authentication> and <sessionState>
    elements from web.config I'm noe presented with the
    follwoing error:


    Pr Error
    Description: An error occurred during the parsing of a
    resource required to service this request. Please review
    the following specific p error details and modify
    your source file appropriately.

    Pr Error Message: Could not create
    type 'BackupContent_WebService.BackupContent_Service'.

    Source Error:


    Line 1: <% WebService Language="c#"
    Codebehind="ContentBackup.asmx.cs"
    Class="BackupContent_WebService.BackupContent_Serv ice" %>


    Can you shed any light on this? When I temporarily make
    the virtual directory into an IIS Application, everything
    runs as normal and the Web Service can be instantiated as
    expected.

    Thanks

    Ben

    >-----Original Message-----
    >That is a problem with any configuration section you
    >placed inside the Web.config, that can be only defined
    in
    >machine.config or in an application directory inside IIS.
    >Look at the source error for more information. For
    >example, the section "autentication" cannot be placed
    >inside a Web.config file that isnīt placed in a IIS
    >application directory.
    >
    >>-----Original Message-----
    >>How do you run an XML Web Service from within an IIS
    >Virtual Directory
    >>without creating an application.
    >>
    >>According to Microsoft you can do this, but I get the
    >following error
    >>when I try to access my Web Service:
    >>
    >>Description: An error occurred during the processing of
    a
    >>configuration file required to service this request.
    >Please review the
    >>specific error details below and modify your
    >configuration file
    >>appropriately.
    >>
    >>Pr Error Message: It is an error to use a section
    >registered as
    >>allowDefinition='MachineToApplication' beyond
    >application level. This
    >>error can be caused by a virtual directory not being
    >configured as an
    >>application in IIS.
    >>
    >>
    >>Any ideas?
    >>
    >>thanks
    >>
    >>Ben Fidge
    >>.
    >>
    >.
    >
    Ben Fidge Guest

  5. #5

    Default Re: Running XML Web Service from IIS Virtual Directory without creating application

    Seems to me the ASPX pr is trying to resolve the type
    BAckupContent_WebService.BackupContent_Service

    This sort of thing is normally provided in a DLL, which is in the bin dir of
    the app.


    --
    Dino Chiesa
    Microsoft Developer Division
    d i n o c h o n l i n e . m i c r o s o f t . c o m

    "Ben Fidge" <ben.fidgebtopenworld_nospam.com> wrote in message
    news:025e01c393bd$7c01f170$a001280aphx.gbl...
    Juan,

    Thanks for your help. Altough this resolved that
    particular problem, I still can't run my Web Service from
    a plain virtual directory.

    After removing the <authentication> and <sessionState>
    elements from web.config I'm noe presented with the
    follwoing error:


    Pr Error
    Description: An error occurred during the parsing of a
    resource required to service this request. Please review
    the following specific p error details and modify
    your source file appropriately.

    Pr Error Message: Could not create
    type 'BackupContent_WebService.BackupContent_Service'.

    Source Error:


    Line 1: <% WebService Language="c#"
    Codebehind="ContentBackup.asmx.cs"
    Class="BackupContent_WebService.BackupContent_Serv ice" %>


    Can you shed any light on this? When I temporarily make
    the virtual directory into an IIS Application, everything
    runs as normal and the Web Service can be instantiated as
    expected.

    Thanks

    Ben

    >-----Original Message-----
    >That is a problem with any configuration section you
    >placed inside the Web.config, that can be only defined
    in
    >machine.config or in an application directory inside IIS.
    >Look at the source error for more information. For
    >example, the section "autentication" cannot be placed
    >inside a Web.config file that isnīt placed in a IIS
    >application directory.
    >
    >>-----Original Message-----
    >>How do you run an XML Web Service from within an IIS
    >Virtual Directory
    >>without creating an application.
    >>
    >>According to Microsoft you can do this, but I get the
    >following error
    >>when I try to access my Web Service:
    >>
    >>Description: An error occurred during the processing of
    a
    >>configuration file required to service this request.
    >Please review the
    >>specific error details below and modify your
    >configuration file
    >>appropriately.
    >>
    >>Pr Error Message: It is an error to use a section
    >registered as
    >>allowDefinition='MachineToApplication' beyond
    >application level. This
    >>error can be caused by a virtual directory not being
    >configured as an
    >>application in IIS.
    >>
    >>
    >>Any ideas?
    >>
    >>thanks
    >>
    >>Ben Fidge
    >>.
    >>
    >.
    >

    Dino Chiesa [Microsoft] Guest

  6. #6

    Default Re: Running XML Web Service from IIS Virtual Directory without creating application

    By default the DLL file must be in a folder called "bin" in the root of the
    IIS Application. Backtrack from the virtual directory to the folder which is
    the root of the app (which may be wwwroot I guess), create a "bin" folder
    there, copy the DLL to that folder and it should work.

    "Ben Fidge" <ben.fidgebtopenworld_nospam.com> wrote in message
    news:025e01c393bd$7c01f170$a001280aphx.gbl...
    Juan,

    Thanks for your help. Altough this resolved that
    particular problem, I still can't run my Web Service from
    a plain virtual directory.

    After removing the <authentication> and <sessionState>
    elements from web.config I'm noe presented with the
    follwoing error:


    Pr Error
    Description: An error occurred during the parsing of a
    resource required to service this request. Please review
    the following specific p error details and modify
    your source file appropriately.

    Pr Error Message: Could not create
    type 'BackupContent_WebService.BackupContent_Service'.

    Source Error:


    Line 1: <% WebService Language="c#"
    Codebehind="ContentBackup.asmx.cs"
    Class="BackupContent_WebService.BackupContent_Serv ice" %>


    Can you shed any light on this? When I temporarily make
    the virtual directory into an IIS Application, everything
    runs as normal and the Web Service can be instantiated as
    expected.

    Thanks

    Ben

    >-----Original Message-----
    >That is a problem with any configuration section you
    >placed inside the Web.config, that can be only defined
    in
    >machine.config or in an application directory inside IIS.
    >Look at the source error for more information. For
    >example, the section "autentication" cannot be placed
    >inside a Web.config file that isnīt placed in a IIS
    >application directory.
    >
    >>-----Original Message-----
    >>How do you run an XML Web Service from within an IIS
    >Virtual Directory
    >>without creating an application.
    >>
    >>According to Microsoft you can do this, but I get the
    >following error
    >>when I try to access my Web Service:
    >>
    >>Description: An error occurred during the processing of
    a
    >>configuration file required to service this request.
    >Please review the
    >>specific error details below and modify your
    >configuration file
    >>appropriately.
    >>
    >>Pr Error Message: It is an error to use a section
    >registered as
    >>allowDefinition='MachineToApplication' beyond
    >application level. This
    >>error can be caused by a virtual directory not being
    >configured as an
    >>application in IIS.
    >>
    >>
    >>Any ideas?
    >>
    >>thanks
    >>
    >>Ben Fidge
    >>.
    >>
    >.
    >

    Chris Botha Guest

  7. #7

    Default Re: Running XML Web Service from IIS Virtual Directory without creating application

    Chris,

    Thanks for your help. I have got my web service running using what you
    suggested. However, as my client (UK National Health Service) is running
    their sites from a co-hosted server, I wanted to run my web service from
    within it's own virtual folder just to keep it seperate from the main
    application(s) (the web service is not acutally part of the application).

    Thanks a lot,

    Ben


    "Chris Botha" <chris_s_bothaAT_h.o.t.m.a.i.l.com> wrote in message
    news:u3I5fIFlDHA.2456TK2MSFTNGP09.phx.gbl...
    > By default the DLL file must be in a folder called "bin" in the root of
    the
    > IIS Application. Backtrack from the virtual directory to the folder which
    is
    > the root of the app (which may be wwwroot I guess), create a "bin" folder
    > there, copy the DLL to that folder and it should work.
    >
    > "Ben Fidge" <ben.fidgebtopenworld_nospam.com> wrote in message
    > news:025e01c393bd$7c01f170$a001280aphx.gbl...
    > Juan,
    >
    > Thanks for your help. Altough this resolved that
    > particular problem, I still can't run my Web Service from
    > a plain virtual directory.
    >
    > After removing the <authentication> and <sessionState>
    > elements from web.config I'm noe presented with the
    > follwoing error:
    >
    >
    > Pr Error
    > Description: An error occurred during the parsing of a
    > resource required to service this request. Please review
    > the following specific p error details and modify
    > your source file appropriately.
    >
    > Pr Error Message: Could not create
    > type 'BackupContent_WebService.BackupContent_Service'.
    >
    > Source Error:
    >
    >
    > Line 1: <% WebService Language="c#"
    > Codebehind="ContentBackup.asmx.cs"
    > Class="BackupContent_WebService.BackupContent_Serv ice" %>
    >
    >
    > Can you shed any light on this? When I temporarily make
    > the virtual directory into an IIS Application, everything
    > runs as normal and the Web Service can be instantiated as
    > expected.
    >
    > Thanks
    >
    > Ben
    >
    >
    > >-----Original Message-----
    > >That is a problem with any configuration section you
    > >placed inside the Web.config, that can be only defined
    > in
    > >machine.config or in an application directory inside IIS.
    > >Look at the source error for more information. For
    > >example, the section "autentication" cannot be placed
    > >inside a Web.config file that isnīt placed in a IIS
    > >application directory.
    > >
    > >>-----Original Message-----
    > >>How do you run an XML Web Service from within an IIS
    > >Virtual Directory
    > >>without creating an application.
    > >>
    > >>According to Microsoft you can do this, but I get the
    > >following error
    > >>when I try to access my Web Service:
    > >>
    > >>Description: An error occurred during the processing of
    > a
    > >>configuration file required to service this request.
    > >Please review the
    > >>specific error details below and modify your
    > >configuration file
    > >>appropriately.
    > >>
    > >>Pr Error Message: It is an error to use a section
    > >registered as
    > >>allowDefinition='MachineToApplication' beyond
    > >application level. This
    > >>error can be caused by a virtual directory not being
    > >configured as an
    > >>application in IIS.
    > >>
    > >>
    > >>Any ideas?
    > >>
    > >>thanks
    > >>
    > >>Ben Fidge
    > >>.
    > >>
    > >.
    > >
    >
    >

    Ben Fidge Guest

Similar Threads

  1. Replies: 0
    Last Post: August 31st, 04:57 PM
  2. Web Application, virtual directory
    By Fek in forum ASP.NET Web Services
    Replies: 0
    Last Post: April 5th, 03:11 PM
  3. IIS Virtual Directory Create Failure in Web Service :(
    By Eskimo in forum ASP.NET Security
    Replies: 5
    Last Post: November 8th, 05:49 PM
  4. Replies: 3
    Last Post: June 8th, 08:40 PM
  5. Replies: 1
    Last Post: May 21st, 03:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139