Solved

WCF on IIS 7.0 Service Security Configuration Issue using Basic Authentication

Posted on 2012-03-28
4
920 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

930 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

16 Experts available now in Live!

Get 1:1 Help Now