Hello I got a webservice that works fine on my machine windows xp with sp2 and iis5, when I move it to the production server I got this error.
Both on development machine and testing machine has anonymous authetnication turned on and alo windows integrated authentication.
The request failed with HTTP status 403: Forbidden.
Ws.
WSKepler ws;#region
Singleton private Delegados(){
ws =
new WSKepler();ws.UseDefaultCredentials =
true; Localizator objLocalizator = Localizator.GetInstance();ws.Url =
Localizator.WebServiceUrl; //ws.Credentials = System.Net.CredentialCache.DefaultCredentials;UsernameClientAssertion assert = new UsernameClientAssertion("admin", "nimda"); // create policy Policy policy = new Policy();
policy.Assertions.Add(assert);
// and set it to web servicews.SetPolicy(policy);
}
This is the web.config
xml version="1.0" >
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<
configuration><
configSections><!--
Register WSE config section --><
section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></
configSections><
appSettings/><
connectionStrings/><
system.web><!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
--><
compilation debug="true"><
assemblies><
add assembly="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><
add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><
add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><
add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><
add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation><!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
--><
authentication mode="None"/><!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
--><
webServices><!--
Don't forget to disabled GET, POST protocols for web services --><
protocols><
remove name="HttpPost"/><
remove name="HttpGet"/></
protocols><!--
Enable WSE 3.0 --><
soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></
webServices><
trust level="Full"/></
system.web><
microsoft.web.services3><
diagnostics><
trace enabled="true" input="InputTrace.webinfo" output="OutputTrace.webinfo"/></
diagnostics><
security><
securityTokenManager><!--
Register our custom Username token manager --><
add type="LibUserNameAssertion.ServiceUsernameTokenManager, LibUserNameAssertion" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/></
securityTokenManager></
security><
policy fileName="wse3policyCache.config"/></
microsoft.web.services3></
configuration>