WCF / ASMX :: Kerberos Authentication Custom Binding?

Sep 15, 2010

I am using Kerberos as the Authentication mode for a WCF Client to interact with an ASMX Web Service. I am using customBinding in the WCF Client. I am getting the below mentioned Fault Exception when I invoke the HelloWorld Method by creating a Proxy using SVCUTIL.

`System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: WSE841: An error occured processing an outgoing fault response. ---> System.Web.Services.Protocols.SoapException:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: WSE914: This instance of derived key token does not support encryption, decryption, or key wrapping. It can only be used to sign or verify signature. Please make sure that the length of the derived key matches the length of the key required by the symmetric encryption algorithm configured for the derived key token manager.

at Microsoft.Web.Services3.Security.Tokens.DerivedKeyToken.Psha1SymmetricKeyAlgorithm.get_EncryptionFormatter()
at Microsoft.Web.Services3.Security.EncryptedData.ResolveDecryptionKey(String algorithmUri, KeyInfo keyInfo)
at Microsoft.Web.Services3.Security.EncryptedData.Decrypt(XmlElement encryptedElement)

I am badly struck with this exception and unable to progress further.

View 2 Replies


Similar Messages:

HttpWebRequest With Kerberos Authentication?

Sep 14, 2010

I am trying to connect to a web service that uses Kerberos Authentication to authorize the user, but all I get is a 401 unauthorized everytime I try to make the request. Below is the code that I am using.

public XPathNavigator GSASearch(string url, string searchString)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url + searchString);
request.CookieContainer = new CookieContainer();
request.Credentials = CredentialCache.DefaultCredentials;
request.ContentType = "text/xml";
request.Method = "POST";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
XPathDocument doc = new XPathDocument(receiveStream);
return doc.CreateNavigator();
}

EDIT: I feel I should explain a bit more what I am attempting to do. I have been tasked with providing a new interface for my company's Google Search Appliance. I am using an ASP.NET page, which does some things like choose a Collection depending on where a user is located, etc. and then sends the appropriate search string the the GSA. This was all working well until they decided to turn authentication on, and now I can't get any results (I either get a 401 unauthorized, or a message stating that 'Data at the root level is invalid'). If I take the search string and provide it directly to the GSA, it authenticates fine, and displays the results, I just can't seem to get it through the HttpWebRequest.

EDIT 2: I did a little more looking (ran the request through Fiddler) and it looks like the request is only attempting Negotiate and not Kerberos. I set the credentials to use Kerberos explicitly as below, but it didn't help...

public XPathNavigator GSASearch(string url, string searchString)
{
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(url), "Kerberos", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url + searchString);
request.CookieContainer = new CookieContainer();
request.PreAuthenticate = true;
request.Credentials = credCache;
request.ContentType = "text/xml";
request.Method = "POST";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
//StreamReader readStream = new StreamReader(receiveStream);
XPathDocument doc = new XPathDocument(receiveStream);
return doc.CreateNavigator();
}

EDIT 3: Ok, looking closer again, the CredentialCache.DefaultCredentials doesn't appear to have my network credentials in it...

View 1 Replies

End-to-end Kerberos Delegated Authentication In .NET?

Jun 3, 2010

I'm trying to setup an internal website that will contact another backend service within the network on behalf of the user using a HttpWebRequest.I have to use Integrated Windows Authentication on the ASP.NET application as the backend system only supports this type of authentication.

I'm able to setup IWA on the ASP.NET application, and it's using kerberos as I expect it to. However when the authentication is delegated to the backend system it doesn't work anymore. This is because the backend system only supports kerberos IWA, but the delegation for some reason - even though the incoming request is kerberos authenticated - converts the authentication to NTLM before forwaring to the backend system.

what I need to do on the ASP.NET application in order to allow it to forward the identity using kerberos?I've tried the following but it doesn't seem to work

CredentialCache credentialCache = new CredentialCache();
credentialCache.Add(request.RequestUri, "Negotiate", CredentialCache.DefaultCredentials.GetCredential(request.RequestUri, "Kerberos"));
request.Credentials = credentialCache;

I've also tried to set "Kerberos" where it now says "Negotiate", but it doesn't seem to do much.

View 1 Replies

Security :: Windows Authentication/Kerberos Configuration?

May 13, 2010

I have a Web App server (WAS) and a database server (DBS). I need to know how to configure both servers, changes to make in the web.config, and any changes to the database needed to allow Windows Authentication from WAS to DBS. I know Kerberos needs to be setup and I know SPNs will need to be created, but I am not sure what all needs to be done.

View 1 Replies

Security :: Implement Kerberos Authentication - Pros & Cons?

May 7, 2010

how to implement kerberos authentication in asp.net. Pros & Cons of this authentication process.

View 1 Replies

WCF / ASMX :: WCF Username Authentication With A Custom Validator?

Feb 18, 2011

how to implement WCF username authentication with a custom validator in both client side and server side. I am trying this since last 2 days. but no result.

View 7 Replies

WCF / ASMX :: Custom Basic Authentication With WCF REST / Getting Error "401 - Unauthorized"

Mar 30, 2010

I want to implement a custom authentication in my application using the basic authentication schema. I've configured it in the Web.config and enabled the basic authentication in the IIS, but when I try to open the service in the browser... appears a login dialog... what do I have to put ther? Besides, I want to control the authentication, I mean, I want to check whom is allowed in my custom list... where is it looking now?

When I use the WebRequest class, I'm getting a "401 - Unauthorized":

req = WebRequest.Create("http://localhost/RESTfulService/Service1.svc/Test");
req.Credentials = CredentialCache.DefaultNetworkCredentials;
WebResponse res = req.GetResponse();

What do I have to do for implement a custom basic authentication? (I cannot use membership providers).

I've set up in the Web.config:

[code]....

View 1 Replies

WCF / ASMX :: How To Automatically Switch Binding

Aug 13, 2010

I have a wcf service which is running on IIS7 using WsHttpBinding but further requirement I need to create another end point using NetTCPBinding.And I want to host my wcf service like if my client application in intranet it will use NetTcpBinding or if it is in internet then it will use WSHttpBinding.

View 3 Replies

ASMX :: Using WCF To Binding To A Remote WebSphere MQ?

Jan 11, 2011

I am new to WCF, I have read where you can Bind to a MSMQ, my question is can you also bind to a remote queue running on a Unix box? If this is possible, how would you define your endpoint (address,bining) and what Binding type and binding configuration do you need to use?

using .NET 3.5, IBM WebSphere MQ on unix the QManager is running v6.0.

View 1 Replies

WCF / ASMX :: Error While Adding Pollingduplex Binding?

Aug 20, 2010

I am making samle of polling duplex in .net 4.0

when ever i put binding this tag in web.config it shows error.

<bindings>
<pollingDuplexHttpBinding/>
</bindings>

Warning 1 The element 'bindings' has invalid child element 'pollingDuplexHttpBinding'. List of possible elements expected: 'basicHttpBinding, customBinding, msmqIntegrationBinding, netPeerTcpBinding, netMsmqBinding, netNamedPipeBinding, netTcpBinding,
wsFederationHttpBinding, ws2007FederationHttpBinding, wsHttpBinding, ws2007HttpBinding, wsDualHttpBinding, netTcpContextBinding, wsHttpContextBinding, basicHttpContextBinding, mexHttpBinding, mexHttpsBinding, mexNamedPipeBinding, mexTcpBinding, webHttpBinding'.
D:DuplexTestTestPollingDuplexWcfTestPollingDuplexWcfTestPollingDuplexWcfWeb.config 9 8 TestPollingDuplexWcf

View 3 Replies

WCF / ASMX :: Strategy Required : Different Binding For Different Contracts?

Dec 23, 2010

I am developing a clickonce application that talks to the server via WCF. So far it works fine with a WCF service that uses wsHttpBinding to talk to the server.Here's what works so far: -

1. I have a WCF web site named "TotemWCF" that runs on an SBS 2003 server (=IIS V6).

2. The service.svc for this is

<%@ ServiceHost Language="VB" Debug="true" Service="Service" CodeBehind="~/App_Code/Service.vb" %>

3. There is a contract: IService.vb, containing several contracts like

<OperationContract()> _
Function NTVSearch() As totem.NTViewDataTable[code]......

In initial testing I used this for ALL communication, but it seems to me that it's a bad idea to use streaming for simple "Get a value from the database" communication and it seems to be introducing errors into my program. So my question is: - "What is the best way of managing this, so that Function1 goes via one binding, and Function 2 goes via another binding. Do I create separate services at the level of the web site, the contract, the service, or the function?

View 3 Replies

Custom Server Controls :: Custom Server Control From Datalist Not Binding?

Feb 24, 2010

I have a control inherited from datalist because I want all the same functionality but with a couple of extra properties.

I have a method that goes off and gets the data inside the control (instead of using a separate datasource ID). It's reading it from XML into a datatable.

If on the code behind of the aspx page I put the control on I put a thecontrol.databind() in the page load, all works well.

However I'd rather not have to do this, instead the control should bind itself.

I gather it's something to do with the order of events but I'm not sure what to do about it.

I don't want to reinvent the datalist wheel, just add a couple of properties and get it's own data

Sample code (some code removed for clarity)

[Code]....

View 1 Replies

WCF / ASMX :: Want To Use Https, Endpoint Binding Doesnt Work

Sep 3, 2010

I am very new to WCF, I have read a lot and seen several presentations about it. I can get the basicHttp endpoint to work on my server but when i wanted to use https, I found that that endpoint binding doesnt work. I think through my research that the wsHttp binding is what i need. I can get the client to work but the service gives me a few different errors when I try to call the ssl endpoint.

Currently i get the following error:

The requested service, 'https://devwcftestsite.crata.ucf.edu/services/Person.svc/Person' could not be activated. See the server's diagnostic trace logs for more information.

Below I have included the web.config for my service project which is hosted at:https://devwcftestsite.crata.ucf.edu/services the service is called:Person.svc

[Code]....

View 2 Replies

WCF / ASMX :: How To Provide Windows Authentication Using WCF

Jan 21, 2011

I have a silverlight application and I want to provide windows authentication to the application through WCF.

View 1 Replies

WCF / ASMX :: How To Publish A Service With Authentication

Feb 10, 2011

how to publish a service with authentication

View 2 Replies

WCF / ASMX :: SSO Authentication Token And POX Interfaces

Jul 28, 2010

We have a SSO authentication service that other externally facing web pages and services use to authenticate users. A user tries to reach a service, if no cookie is found containing an authentication token, they are redirected (HTTP 302) to the SingleSignOn authentication service. The auth service does it's work, and redirects the user (HTTP 302) to the original URL with their encrypted authentication token in the URL. Great. How can I invoke this from a WCF POX service? No SOAP here, just HTTP GET/POST with XML responses.

What I'm currently doing is, in each service method implementation method, checking the headers for the cookie. If the cookie exists, verify the auth token and process the request. If the cookie doesn't exist or the auth token has expired, then respond with:

[Code]....

That works, but isn't integrated with any of the WCF features, and requires me to manually code for a whole bunch of scenarios. Is there a way I could implement this using these classes:

[Code]....

or use some other means that checks each request to the service? I've been reading pages like: How to: Create a Custom Token, but I don't see how it applies to my needs. I'm looking into this because I have some time before my project kicks off, and I'd like to implement this project correctly and learn about WCF as much as I can.

View 2 Replies

WCF / ASMX :: Authentication For A Public Web Service?

May 14, 2010

By default web service is enable for windows authentication. But if we want to expose our service to public domain, then I guess we have to use some specific credential for web service authentication. Can anyone tell me how to set those credential at service side and validate it for client and how the client will send those credentials?

View 1 Replies

WCF / ASMX :: Web Service Call With Authentication?

Dec 30, 2010

We are gonna call web service with username and password. how to implement this on a web service client?

View 1 Replies

WCF / ASMX :: UserName Authentication Not Firing?

Oct 5, 2010

I have a WCF application set up to use UserName authentication through the built in MembershipProvider. When I call up a simple test function to see if the user is authenticated I get false. I've included as much info as I can.

The simple method in WCF:

[Code]....

Identity.Username and all that is blank as well.

This is the test code I'm using (from a test project):

[Code]....

And here are the relevant sections of web.config:

[Code]....

View 1 Replies

WCF / ASMX :: How To Provide Security / Cleared All The Binding,Endpoint,Contract Concepts

Aug 10, 2010

How I provide Security In wcf . I have Cleared All the binding,Endpoint,Contract Concepts.

View 4 Replies

WCF / ASMX :: Unable To Import Binding 'CalcualteBinding' From Namespace 'http://Calcualte?

Feb 16, 2010

I am developing web application using csharp on Visual studio 2008. Now I want to use a web service which was developed in Java. I am able to add the web service to my application as a refrence but when I want to build or compile I am getting the following Unable to import binding 'CalcualteBinding' from namespace 'http://Calcualte.webservices.CourseZa.org'. .

View 2 Replies

WCF / ASMX :: How To Implement Form Authentication Service

Nov 1, 2010

How to implement form authentication wcf service?

View 1 Replies

WCF / ASMX :: Finding Basic Authentication For Web Service

Sep 30, 2010

i call my project web service, previously there was no pre-authetication. Now i didn't work web service. My code is as follows:

[Code]....

View 5 Replies

WCF / ASMX :: Authentication For Webrefrence In Service Library?

Jan 5, 2011

1. i am calling wsdl of api it is asking for username and password . I configured that and now i am able to see wsdl 2. i have an this API from my wcf application , first i have tried with WCF service application . i add the API as WEBrefrence and created code like that

localhost.WebServicesSessionSpringBeanService service= new localhost.WebServicesSessionSpringBeanService();

View 2 Replies

MVC :: Custom Model Binding Is Not Working?

Feb 3, 2010

I am working on the example from Steven Sanderson's book 'Pro ASP.NET MVC Framework'. The cart class is coming up as empty in my Index action method of CartController class.

[Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved