exp2000

I am doing labs from .NET Framework 3.0 Training Kit for WCF and I am having trouble hosting service in IIS. I get the error message: An error occurred loading a configuration file: Failed to start monitoring changes to 'C:\Users\Web\Documents\Visual Studio 2005\Projects\DerivativesCalculator\DerivativesCalculatorService' because access is denied.

How do I set up IIS and permissions on the directory. I am running Windows Vista with IIS 7.

Here is what lab says. I did all of it and still cannot get it to work. I also changed Physical Path credentials to specific user rather the flow through as I was getting some other message.

Task 2 ĘC Add a .SVC file to the DerivativesCalculatorService Project
1. Add a text file named, Service.svc, to the DerivativesCalculatorService project.
2. Add content to that file so that it looks like this:
<%@ServiceHost Service="DerivativesCalculatorService.Calculator" %>

Task 3 ĘC Create a Virtual Directory Pointing to the Project Directory in IIS
1. Choose Administrative Tools | Internet Information Services (IIS) Manager from the Windows Start menu.
2. Expand the nodes of the tree control in the left-hand pane until the node named, Default Web Site becomes visible.

Page 13

3. Right-click on that node, and choose New|Virtual Directory from the context menu that appears.
4. In the Virtual Directory Creation Wizard, enter, DerivativesCalculator in the Virtual Directory alias screen.
5. Enter, c:\Windows Communication Foundation\Labs\DerivativesCalculator\DerivativesCalculatorService as the path on the Web Site Content Directory screen of the wizard.
6. Select the Read, and Run Scripts permissions on the wizardí»s Virtual Directory Access Permissions screen, then click on the button labeled, Next, and follow the instructions to exit from the wizard.


Task 4 ĘC Configure the Service
1. Add a new web configuration file named, Web.config, to the DerivativesCalculatorService project in the DerivativesCalculator solution.
2. Modify the contents of that file thusly (or copy the app.config from the host project, rename to web.config and null out the address attribute) :
< xml version="1.0" encoding="utf-8" > <configuration> <system.serviceModel> <services> <service name="DerivativesCalculatorService.Calculator"> <endpoint address="" binding="basicHttpBinding" contract="DerivativesCalculatorService.IDerivativesCalculator"/> </service> </services> </system.serviceModel> </configuration>
Task 5 ĘC Confirm the Availability of the Service
1. Build the DerivativesCalculator solution.
2. Choose Run from the Windows Start menu, and enter,

http://localhost/DerivativesCalculator/Service.svc
Internet Explorer should open and display a page similar to the one in figure 2.2, above.



Re: Windows Communication Foundation (Indigo) Hosting service in IIS - Derivatives Calculator Service Lab question

Namita Purohit-MSFT

I had a similar problem. It got resolved when I enabled directory browsing in IIS.

Click the virtual directory node in IIS,Select the features view.

Double click directory browsing. In the Actions window select enable option.

Set the security of your folder to allow it to be accessed by others.





Re: Windows Communication Foundation (Indigo) Hosting service in IIS - Derivatives Calculator Service Lab question

James.Zhang - MSFT

That directory C:\Users\Web\Documents\Visual Studio 2005\Projects\DerivativesCalculator\DerivativesCalculatorService should allow being accessed by "Network Service" (If you havn't the identity of the app pool).