473,508 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WCF Authorization Error

crm
Hi,
I'm implementing my first WCF application. Everything works fine if I
host it in the development web server, but when I add the virtual
directory to IIS I start getting the following error:

"System.ServiceModel.Security.MessageSecurityExcep tion: The HTTP
request is unauthorized with client authentication scheme 'Anonymous'.
The authentication header received from the server was
'Negotiate,NTLM'."

I get this error both in my own application and in the wcfTestClient.
IIS is configured to use NT Authentication, and to allow anonymous
access. I have an asmx file in the same project that I can access.

I have two endpoints defined, one for basicHttpBinding and one for
wsHttpBinding. I have not changed the app.config from what was
generated when adding the wcf webservice reference to my project.

Code:
Dim Service As New
WcfService.ifcServiceClient("BasicHttpBinding_ifcS ervice")
Dim objResult As clsTestObject = Service.GetTestObject

Config
<system.serviceModel>
<bindings>

<basicHttpBinding>
<binding name="BasicHttpBinding_ifcService"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>

<wsHttpBinding>
<binding name="WSHttpBinding_ifcService"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true"
inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>

<client>
<endpoint address="http://localhost/Service.svc"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_ifcService"
contract="WcfService.ifcService"
name="WSHttpBinding_ifcService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="http://localhost/Service.svc/basic"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ifcService"
contract="WcfService.ifcService"
name="BasicHttpBinding_ifcService" />
</client>
</system.serviceModel>

Please help.
Thanks,
Chris McKenzie
Plenase
Oct 21 '08 #1
0 1792

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3942
by: Matthew Wilson | last post by:
I am writing a script to check on my router's external IP address. My ISP refreshes my IP very often and I use dyndns for the hostname for my computer. My Netgear mr814 router has a webserver that...
3
4758
by: zbychu | last post by:
Hi, I have a problem with a special sql. My configuration : IBM DB2 V8.1.5 / AIX Procedure: CREATE PROCEDURE DB2TARAN.SetSessionAutor() SPECIFIC x.SetSessionAutor LANGUAGE SQL P1: BEGIN
3
2505
by: nick | last post by:
Hi, How should I write the web.config file to allow some of the aspx files be executable to all users and others are required users to login? All the aspx files are in the same folder.
9
2736
by: Bijoy Naick | last post by:
I've implemented forms authentication and authorization on my application. In my Web.Config, my authorization section looks like this.. <authorization> <allow roles="admin" /> <deny users="*"...
4
1971
by: Johnnie Norsworthy | last post by:
ASP.NET 2.0 How do I configure my web site to require forms authorization only for a subfolder off the root? I know how to set Web.config for forms authentication for the whole site, but I need...
5
2059
by: Chris Ochs | last post by:
It doesn't currently seem possible to switch between different users using SET SESSION AUTHORIZATION. If I log in as the superuser and switch to another user that works, but if I then switch to a...
0
1508
by: gilly3 | last post by:
How do I use a Custom Error page for 401 - Authorization Failed errors? I tried the web.config method: <customErrors mode="On" defaultRedirect="/GeneralError.aspx"> <error statusCode="401"...
14
1770
by: tshad | last post by:
I am trying to set up an intranet at work that will use our Active directory to authorize our users. We also want them to access the site from the outside (such as at home) and also be...
1
1320
by: las | last post by:
I have created a web service and a simple ASP.Net page that makes calls to the web service (the page roughly mimics the standard Visual Studio web service test page). Running on //localhost, if...
0
1250
by: yofnik | last post by:
Hello, Using policy (modifying web.config) and FormsAuthentication, is it possible to return an error message (or redirect to error page) instead of redirecting to the login page for specific...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.