Solved

WCF on IIS 7.0 Service Security Configuration Issue using Basic Authentication

Posted on 2012-03-28
4
924 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
ID: 37775968
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
ID: 37780386
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
ID: 37780550
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
ID: 37795249
I found a solution elswhere and it worked for me. it was very simpe to implement too
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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 single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

776 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