.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Windows authentication in WCF not working

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :ASP.Net

I am using XP and VS2010. I have created a solution which includes two projects (Console Applications) as follows

1) WCF_Service (self hosting)

2) WCF_Client

When I try to pass client credentials to service, I am getting error message "The caller was not authenticated by the service".

Here is my App.Config for the service

<?xml version="1.0" encoding="utf-8" ?>
            <service behaviorConfiguration="MetaExchange"  name="SecurityHost.SecurityS">              
                <endpoint address="http://localhost:8090/WCFSecurity/ws/" 
                          listenUriMode="Explicit" />
                <binding name="ServiceConfig">
                    <security mode="Message">
                      <message clientCredentialType=&quo

View Complete Post

More Related Resource Links

WPF consuming WCF Service with Windows Authentication - Not Working

Hi I am developing a WPF application in .NET 4.0 which calls a WCF Service hosted on the server developed in .NET 4.0. I want to use windows authentication for this purpose and it seems that it is not working and keep on giving me following error. The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via I do not want to use https as this is an Intranet application. The WCF Service inturn calls SQL Server SPs via Entity Framwork 4.0. Following is the Web.Config for WCF Service. <?xml version="1.0"?> <configuration> <connectionStrings> <add name="MsdbEntities" connectionString="metadata=res://*/MsdbModel.csdl|res://*/MsdbModel.ssdl|res://*/MsdbModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=lvapxdev\lvw_uat_02;Initial Catalog=msdb;Integrated Security=SSPI;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> </connectionStrings> <appSettings> <add key="IndexLoaderInstallDirectory" value="D:\Longview\Index Loader\"/> </appSettings> <system.web> <compilation debug="true" targetFramework="4.0" /> <customErrors mode="Off"/> <authentication mode="Windows"></authentication> </syst

Why doesn't the Windows authentication working?


I'm trying to write a simple ASP.NET 4.0 app, using Windows authentication to login.  This is on my peer-to-peer home network.  When I click to login, it instantly shows my Windows identity, so it looks as though I don't even need to login, as it's already done that for me.  However when I then go to any other page in the app, it looks as though I'm not logged in.

Why is that and how do I fix it? 

jquery confirm windows isn't working


Hi, i am using jquery to implement a modal confirm windows but it not working

i have a template field button with ajax confirm using jquery but i have a problem. Apper the confirm windows but when i click on "yes" doesn't execute the delete command. without ajax (using template field button and simple confirm windows javascript) works so well.

Can you give me a hand with this?

thx in advance!

<link href="_assets/css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="_assets/css/confirm.css" rel="stylesheet" type="text/css" />
<script src="_assets/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="_assets/js/jquery.simplemodal-1.1.1.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
       $(".deleteCustomer").click(function(ev) {
                var msg = $(this).attr("title");
                confirm(msg + "?");

Web Matrix + Windows Authentication


I'm curious if its possible to get windows auth working with asp.net webpages/webmatrix.

I've got it published to IIS with windows auth turned on and anonymous/forms/basic turned off.

I'm guessing the WebSecurity Helper probably won't work here but can you access User.Identity.Name etc?

Sorry for the newbie questions, I've only just started working with asp.net ^^,

Windows Authentication for IIS in Windows 7 Home Premium Edition - for ASP Websites.


How to create a virtual directory and get benefit of the IIS. Is there a workaround to accomplish this without the Windows Authentication for Windows 7 Home Premium Edition?

Thanks in advance, 

Using windows authentication to access SQL when using ASP.NET 4.0 via COM+


I am using SQL Server 2008 under windows authentication, front end is ASP.NET which uses COM+ to access database.

COM+ components are configured to run as domain user.

When looking through the logs (SQL Profiler), I can see the login name as the configured identity instead of windows indentity.

I have got Website running under "Intergrated Windows Authentication" and database is running locally on webserver.

Web configure contains entry for <identity impersonate="true"/>.

My connection string is

connectionString="data source=db01\test01;initial catalog=test; integrated security=SSPI;persist security info=False; Trusted_Connection=Yes"

Any ideas?




Not working on Windows Server 2008




I had the CSS friendly adapters working great on our old server (windows server 2003 - 32bit) and now we have moved to a 64 bit environment and now I can not get the CSS friendly adapters to work.

We are using SharePoint 2007.

Is there another work thru for 64bit environment.

I notice windows server 2008 has a directory  C:\Windows\Microsoft.NET\Framework64 would I be using the browser file in this directory???

Please help!

Forms based users being prompted for windows authentication login for My Sites photos in user lists

Here's an issue I didn't see coming for our forms based authentication users. 

We have a web application extended to an external url to handle forms based authentication for users outside of our domain. Our setup looks like this...

Internal Users/Windows Authentication - moss.domain.com
External Users/Forms Based - mossext.domain.com
My Site for Internal Users - mysites.domain.com

When our forms based users are accessing user lists, or discussion pages that display user pictures, they are getting a windows authentication login for our internal users (mysites.domain.com) who have populated their my site with personal photo.

How do we fix this? 

Office Sharepoint Server Search not working but Windows Server Search is.

I am having an annoying Issue with the Sharepoint 2007 Enterprise search functionality. I cannot get the Search Centre to work, the out of the box webparts crash the page except the Searchbox when the others are closed. The event viewer shows up numerous Errors (Office Sharepoint Server - EventID 7080) returns with and the same when trying to add a search related web part (e.g. core.results, federated etc). EventID 6398 - Timer is a regular as is 7080. Details below.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).

Remote connections are connected, I am not 100% on the Instance name, (how would I go about checking this?)

Also I cannot access the link to SharedServices1 - Open Shared Services Admin site (not clickable), guess it's permissions but I seem to have full site permissions, I think I need SSP-Admin to make more edits to the Search, maybe this is related :s

Both Search Servers are runnig, I have tried everything I can think of to fix this and allow the Search Centre to work.

I am running Sharepoint 2007 on SQL Server 2008.

=User!UserID from windows authentication using table from another database



i'm using sql server 2005, sql server business intelligence development studio for my reports and deploy them in my wss3.0 site.

what i'm trying to do is i'm trying to restrict wich users can see specific data within a report.

now, the thing is. the report gets the data out of my DB1 database and my windows authenticated user are in the WSS_content database.

when i deploy my report in my wss3 site. it gets the user that is loged in. but of course it does not display any data because the tables are not in the same database.

does someone knows how to do this?

ASP.NET Windows Authentication


Hello ,

When you configure web.config to use windows authentication....how does asp.net track user session..

does it use cookies like in  forms authentication ? Non-persistent ?

Windows authentication login form issue


Hi guys,

I have an application that requires windows authentication to login, the problem is that every time an user logs in under IE and win XP, the username is pre filled with the IP address of the server as instance and the username. I need to replace the server ip with  XXXX instance name instead of doing this manually.

Could anyone pleas help me out with this one?

Thanks in advance,


Automatic expiration of forms authentication when user closes the browser windows without signing ou

Dear all, can u tell me how to automatically sign out a user if he/she closes the browser window without signing out. I'm using Forms Authentication.   Thanks 

windows authentication issue with different domain

Webservice(frame work 2.0 & VB.NET) connecting to SQL Server 2008 in Windows Authentication mode and WS configured on App pool with domain\user id credentials and granted full access to temp folder still getting the following error. System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\WINDOWS\TEMP\ixymjcwh.0.cs' could not be found error CS2008: No inputs specified at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence) at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.H

FTP Task working in XP but not working in Windows 7/2008 machines

Hey , A FTP Task in IS pkg is working fine when executed through BIDS in my Win XP machine ..but the same package is not working in Win 7/2008 machine. FTP task fails with the error : [FTP Task] Error: Unable to connect to FTP server using "FTPFolder.TempData.com". Here are few facts about my troubleshooting : 1) From my XP machine... I am able to connect to the FTP Server using DOS Cmds but fails in 2008 machine saying "Unknown host" I did : Run>Cmd>FTP>Open FTPFolder.TempData.com 2) I can view the files on the FTP server through a browser ( URL was given )on both the machines with no issues. 3) I created Port exception for 20 & 21 Ports for 2008 machine ...still no luck. 4) When I PING the FTP server --Cmd>PING FTPFolder.TempData.com On XP Machine...though FTP Server Name is resolved to IP... I still receive "Request timed out." On 2008 Machine ...the IP is not even resolved and error is thrown "Ping request could not find host FTPFolder.TempData.com. Please check the name and try again." 5) I am connecting to FTP Server from my Office machines. I have searched all the threads on this FTP error topic and haven't found the apt thread..so I have opened a new one.

Possibility of Windows authentication in Windows application

Hi, I have developed Windows form application( C#). I need to authenticate user using Windows Authentication mode. i.e When a user tries to access the developed Windows form application , the windows authentication log on screen should pop up asking for the user credentials ( user name , user password, domain). Our requirement is to use the default windows logon screen which generally pops up to get the user credential instead of the custom developed logon screen.This is similar to Windows authentication in ASP.Net but for Windows form application , Is it possible to authenticate user using Windows authentication mode? If so how?

loginview and Windows Authentication?

Can you use a loginview to hide a control (or set of controls) using WIndows Authentication?  All Ic an find are articles on Forms Authentication but I don't use that in my application.  Any other ideas on how to hide a control based on membership to an Active Directory group? 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend