Solved

WCF on IIS 7.0 Service Security Configuration Issue using Basic Authentication

Posted on 2012-03-28
4
919 Views
Last Modified: 2012-04-02
I have spend the last couple of days trying to solve an issue when hosting a WCF service in SQL 2008 Server and IIS 7.0.

This problem only occurs when I have anonymous authentication disabled and using Basic Authentication over SSL as shown in the web.config extract below

    <security mode="Transport">
        <transport clientCredentialType="Basic" />
    </security>

Basically when i try to access MeterReadingService.svc file I get an IIS error saying it cannot find the resource \Account\Login.
It seems I am being redirected to a login page. Forms authentication is not enabled on IIS


Details of Error:

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed Error Information
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL
https://localhost:9011/FrontEndWS/Account/Login?ReturnUrl=%2fFrontEndWS%2fMeterReadingService.svc

Physical Path D:\WebApplications\MeterReaderPortal\FrontEndWS\Account\Login
Logon Method Basic
Logon User Administrator


Can you indicate any pointers why this is happening or how can i log the cause of this error?
0
Comment
Question by:emcict
  • 3
4 Comments
 
LVL 10

Expert Comment

by:gaurav05
Comment Utility
Hi,

Give iis user, network service permission to that physical folder where you install your application.

Also try this.

In IIS manager select your web application under sites.
Once you select your webiste in features view, under IIS, click on Handler Mappings.
Under Actions, click Add Managed Handler.

Add following

Request Path: Reserved.ReportViewerWebControl.axd

Type: Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Name: Reserved-ReportViewerWebControl-axd

let us know
0
 

Author Comment

by:emcict
Comment Utility
Hi,

Thanks for the information, unfortunately it did not work.

I still have the same error.
0
 

Accepted Solution

by:
emcict earned 0 total points
Comment Utility
Hi I solved my issue by adding these to my App settings in web.config:

<add key="autoFormsAuthentication" value="false" />
<add key="enableSimpleMembership" value="false"/>


I found this solution in stack overflow here:
http://stackoverflow.com/questions/8205368/request-redirect-to-account-loginreturnurl-2f-since-mvc-3-install-on-server
0
 

Author Closing Comment

by:emcict
Comment Utility
I found a solution elswhere and it worked for me. it was very simpe to implement too
0

Featured Post

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.

Join & Write a Comment

I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

763 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

12 Experts available now in Live!

Get 1:1 Help Now