Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2003

Tip: Looking for answers? Try searching our database.

Running XML Web Service from IIS Virtual Directory without creating application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Fidge - 15 Oct 2003 15:37 GMT
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 - 15 Oct 2003 17:50 GMT
I might add that the Microsoft source mentioned in my previous post is as
follows:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
condeployingwebservices.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

> How do you run an XML Web Service from within an IIS Virtual Directory
> without creating an application.
[quoted text clipped - 17 lines]
>
> Ben Fidge
Juan Wajnerman - 15 Oct 2003 17:56 GMT
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
[quoted text clipped - 19 lines]
>Ben Fidge
>.
Ben Fidge - 16 Oct 2003 09:14 GMT
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
[quoted text clipped - 37 lines]
>>
>.
Dino Chiesa [Microsoft] - 16 Oct 2003 19:04 GMT
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.

Signature

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

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
[quoted text clipped - 12 lines]
>>
>>Description: An error occurred during the processing of
a
>>configuration file required to service this request.
>Please review the
[quoted text clipped - 18 lines]
>>
>.
Chris Botha - 17 Oct 2003 02:52 GMT
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.

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
[quoted text clipped - 12 lines]
>>
>>Description: An error occurred during the processing of
a
>>configuration file required to service this request.
>Please review the
[quoted text clipped - 18 lines]
>>
>.
Ben Fidge - 18 Oct 2003 10:42 GMT
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

> 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
[quoted text clipped - 78 lines]
> >>
> >.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.