Running XML Web Service from IIS Virtual Directory without creating application

Discussion in 'ASP .Net Web Services' started by Ben Fidge, Oct 15, 2003.

  1. Ben Fidge

    Ben Fidge Guest

    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.

    Parser 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, Oct 15, 2003
    #1
    1. Advertising

  2. Ben Fidge

    Ben Fidge Guest

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

    http://msdn.microsoft.com/library/d...us/cpguide/html/cpcondeployingwebservices.asp

    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" <> wrote in message
    news:...
    > 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.
    >
    > Parser 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, Oct 15, 2003
    #2
    1. Advertising

  3. 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.
    >
    >Parser 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, Oct 15, 2003
    #3
  4. Ben Fidge

    Ben Fidge Guest

    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:


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

    Parser 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_Service" %>


    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.
    >>
    >>Parser 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, Oct 16, 2003
    #4
  5. Seems to me the ASPX parser 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.fidge@btopenworld_nospam.com> wrote in message
    news:025e01c393bd$7c01f170$...
    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:


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

    Parser 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_Service" %>


    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.
    >>
    >>Parser 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], Oct 16, 2003
    #5
  6. Ben Fidge

    Chris Botha Guest

    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.fidge@btopenworld_nospam.com> wrote in message
    news:025e01c393bd$7c01f170$...
    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:


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

    Parser 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_Service" %>


    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.
    >>
    >>Parser 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, Oct 17, 2003
    #6
  7. Ben Fidge

    Ben Fidge Guest

    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_botha@AT_h.o.t.m.a.i.l.com> wrote in message
    news:...
    > 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.fidge@btopenworld_nospam.com> wrote in message
    > news:025e01c393bd$7c01f170$...
    > 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:
    >
    >
    > Parser Error
    > Description: An error occurred during the parsing of a
    > resource required to service this request. Please review
    > the following specific parse error details and modify
    > your source file appropriately.
    >
    > Parser 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_Service" %>
    >
    >
    > 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.
    > >>
    > >>Parser 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, Oct 18, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.iq.ca
    Replies:
    3
    Views:
    529
    Ben Strackany
    Nov 24, 2004
  2. Mike Dorey via DotNetMonster.com

    UIP Block - Deploying to IIS Web Site (not Virtual Directory)

    Mike Dorey via DotNetMonster.com, Feb 16, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    469
    Mike Dorey via DotNetMonster.com
    Feb 16, 2005
  3. hocho888
    Replies:
    1
    Views:
    600
  4. Replies:
    1
    Views:
    18,780
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    May 26, 2006
  5. Eskimo
    Replies:
    5
    Views:
    131
    Joe Kaplan \(MVP - ADSI\)
    Nov 8, 2004
Loading...

Share This Page