Solved

Can't Configure IIS6 for Web Services - It Does Work on Development Workstation

Posted on 2006-07-21
6
307 Views
Last Modified: 2008-02-07
I built a very simple web service for testing purposes.  It runs fine on my Windows XP Professional workstation which is the same machine that the project was developed on.  However, when I put it on my Windows 2003 Server using IIS 6, I get the following error when trying to browse to it.

Server Error in '/AcousticallyChallenged' Application.
--------------------------------------------------------------------------------

Configuration Error
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.

Source Error:


Line 37:            by Microsoft that offers a single logon and core profile services for member sites.
Line 38:     -->
Line 39:     <authentication mode="Windows" />
Line 40:
Line 41:
 

Source File: C:\Web Sites\AcousticallyChallenged\webservices\web.config    Line: 39


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300

What am I missing / not doing / doing wrong?  How do I deploy my web service to my web server so that it can be consumed by other applications?
0
Comment
Question by:Edward Stevens
  • 3
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
masoncooper earned 500 total points
ID: 17156434
If the error message states:
This error can be caused by a virtual directory not being configured as an application in IIS
That would be the first place to look.  Did you place your ASP.Net application in a subdirectory of the root of the site? If so, you need to create a virtual directory and point it to that directory.  This causes IIS to treat your web app as an application instead of a subdirectory of a much larger application.
0
 
LVL 2

Expert Comment

by:kcchenkd
ID: 17157011

try this

in web.config file Change authentication mode form windows to Forms

<authentication mode="Forms" />
0
 
LVL 1

Author Comment

by:Edward Stevens
ID: 17157324
Thanks to both of you.  I will try both tonight.  Below is some additional info that I did not supply initially.

I created a Web Services project using Visual Studio .Net 2003 on my local machine (Windows XP Professional SP2).  After the project was created on my local copy of IIS, I moved the directory to my IIS server on Windows 2003 Server Standard.  I modified the directory reference on my local copy of IIS to point to the other directory such that I wouldn't have to keep copying the files everytime I made a change to the project.  From the workstation, all is still good.  Going to http://localhost/... still allows the web service to function as expected even though the virtual directory is now on the server.

From the server's perspective, the directpry with the web service is located under the virtual directory for the UI portion of the application.  From I've read above, it sounds like I need to create a virtual directory for the web service itself.

I will give that a try tonight.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:Edward Stevens
ID: 17158446
I made the web service have its own virtual directory.  Now, when I go to the URL and click on the function that I have in the DLL, I get the following message in place of what would normally be the parameter dialogue.

The test form is only available for requests from the local machine.

If I go to the URL from my development PC, clicking on the function gives me the parameter dialogue where I am able to test the function and get a return value.

Looks like we're getting closer.  Any ideas?
0
 
LVL 2

Assisted Solution

by:masoncooper
masoncooper earned 500 total points
ID: 17158481
It looks like you may need to modify your web.config a bit more: http://support.microsoft.com/default.aspx?scid=kb;en-us;819267
Try adding this into your system.web
<webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
0
 
LVL 1

Author Comment

by:Edward Stevens
ID: 17158587
kcchenkd - Sorry I didn't award any points to you.  I tried your suggestion but it had no effect on this particular issue.  Thanks anyway.

masoncooper - I split the points on your two suggestions as a way to help others know that I needed to use both suggestions to handle this issue.  As they are both yours, you should still receive the full 500 points.  Thanks much!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Reason for High TTFB 1 34
Select distinct 25 60
Summernote required 3 57
WCAG (Web Content Accessibility Guidelines) levels 3 43
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now