I've started learning web services with ASP.NET. When doing a quick search on how to build and use a simple web service, this page seemed nice and simple.
I followed the instruction "copy FirstService.asmx in the IIS virtual directory...[and] open the web service" (actually, it is displayed as FirstService.asmx.cs), but from there on problems started. I got several HTTP Error (as explained here, I gave permissions to both IUSR and IIS_USRS, though the latter is probably irrelevant) and I'm now stuck with Error 404.7.
I tried the suggestions of these two (1, 2) SO posts (so I now have a second file on my folder, a Web.config
file, though the site linked above said nothing about Web.config
files), nothing helped.
Note that I also followed this page to register the correct version of ASP.NET with IIS.
Is there any other option?
EDIT:
Windows 7 Ultimate (64-bit), IIS 7.5
Full error (pardon the graphics):
Error Summary
HTTP Error 404.7 - Not Found The request filtering module is configured to deny the file extension.
Detailed Error Information
Module: RequestFilteringModule
Notification: BeginRequest
Handler: StaticFile
Error Code: 0x00000000
Requested URL: http://localhost:80/MyWebServices/WebService1.asmx.cs
Physical Path: C:\Users\home\Desktop\MyWebServices\WebService1.asmx.cs
Logon Method: Not yet determined
Logon User: Not yet determined
My Web.config
:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions allowUnlisted="true">
<remove fileExtension="." />
<add fileExtension="." allowed="true" />
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>
</configuration>