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

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

Proxy Authentication in svcutil

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :WCF
Hi, i want to use svcutil (or VS2008 Add Service Reference) to generate a proxy client class for a internet public wcf service, the thing is im behind a proxy, and svcutil fails:    Error de la solicitud con el código de estado HTTP 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).And VS2008 also fails:The remote server returned an unexpected response: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).Error en el servidor remoto: (407) Se requiere autorización del proxy.How can i add a service reference or create a proxy class thru the proxy server ?Thanks!!

View Complete Post

More Related Resource Links

create proxy client with SvcUtil from service using https+cert authentication


Hi all,

I have build two web services one is wcf hosted in iis and the other one is java web service (jax-ws ri) hsted on tomcat. Both of the services uses https and certificate authentication.The certificates are valid and when I check the wsdl's from the browser I can see them without any warning.

So I want to create a wcf client for the services with svcutil. I have created the necessary config file for svcutil (svcutil.exe.config).

When I try to create the proxy files for the java service (svcutil http://JavaServiceIpAddress/service?wsdl) I receive

"metadata contains a reference that cannot be resolved .

<Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/" >
   <faultcode xmlns:a="http://www.w3.org/2003/05/soap-envelope" xmlns="">a:Client</faultcode>
   <faultstring xmlns="">Cannot find dispatch method for {}</faultstring>

the request was aborted: Could not create ssl/tls secure channel"


When I execute svcutil http://WcfServiceIpAddress/service.svc the proxy and configs file are created smoothly. When I try svcutil http://WcfServiceIpAddress/service.svc?wsdl

"error: cannot obtain metadata from http://WcfServiceIpAddress/service.svc?wsdl


Deserializing Problem when build proxy by svcutil from WSDL

Hi, I got a WSDL from a third-party company and have to build a proxy to fetch data. I used svcutil *.wsdl to generate code and config file. Using the proxy I wondered why I got unexpected results: The return value is alway 0 and the string field CTWS_ReturnMsg always empty even if the server sent values. Could anybody help me? Here the WSDL and afterwards the http-traffic (from Wireshark): <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://CEITONWebService.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://CEITONWebService.org/">     <wsdl:types>         <xs:schema xmlns="http://CEITONWebService.org/" xmlns:mstns="http://CEITONWebService.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://CEITONWebService.org" targetNamespace=&q

silverlight + WCF Service + Dynamic proxy(custom binding) + basic authentication on iis

hi all, I am having an issue with how to get windows identity in silverlight project. Below is my scenario: the silverlight application need to get data from server via WCF service, i used the way that built dynamic proxy at runtime and aslo used custombinding in this case. Now my application need to deploy on iis and chosen "basic authentication" as a authentication mode. Thus i have chosen authentication mode in WCF was " <security authenticationMode="UserNameOverTransport">". At the client side where kind of project is silverlight that i need have to dynamic proxy with custombinding. My question is: In basic authentication how can i get windows identity to set to chanelfactory.Credentials: _channelFactory = new ChannelFactory<TWebService>(this._binding, new EndpointAddress(_endpointAddress));            _channelFactory.Credentials.UserName = new UserNamePasswordClientCredential();            _channelFactory.Credentials.UserName.UserName = "username";            _channelFactory.Credentials.UserName.Password = "password"; actually, i do not want to use Windows a

Proxy Authentication

Hi guys, I need a little help.I am working on my project as I am create a if statement that if there is no string in the textbox, displaying the messagebox otherwisse connect to the proxy. Here it is the code:   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Create a new request to the mentioned URL. Dim a As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://whatismyip.com/automation/n09230945.asp"), HttpWebRequest) ' Obtain the 'Proxy' of the Default browser. Dim Proxy As New WebProxy(Address1.Text, Integer.Parse(Ports.Text)) ' Print the Proxy Url to the console. Dim myProxy As New WebProxy() Try If ProxyAddress1.Text Is Nothing Then MsgBox("plz enter the address and ports") Else a.Proxy = New WebProxy(Address1.Text, Integer.Parse(Ports.Text)) Dim c As HttpWebResponse = DirectCast(a.GetResponse(), HttpWebResponse) Dim reader As New StreamReader(c.GetResponseStream()) Dim ip As String = reader.ReadToEnd() MsgBox(ip) If Proxy.Credentials.GetCredential Then myProxy.Credentials = New NetworkCredential(ProxyUsername.Text, ProxyPassword.Text) a.Proxy = Proxy End If End If Catch ex As Exception MsgBox("proxy server fails") End Try End Sub   My problem is that how can I check if the proxy ser

Authentication issues with clients behind proxy


I am having an issue with clients behind a proxy and Windows Integrated authentication on IIS 7.5 - as far as I know this was never an issue when the site was on IIS 6.

Essentially, their credentials are not passing for resources in _layouts or _themes and they are repeatedly prompted.  The IIS log file never shows their credentials for these requests (shows a 401 status), but it does show for the aspx pages (with a 200 status).

When accessing without the proxy, everything is good - so I know it's not an authorization issue.

Why would these resource folders behave differently? Has anyone else seen this? I know there are issues with WIA through a proxy but why did IIS 6 not have a problem?  Google did not turn up much ...

Proxy Authentication Required


Hi guys,

I have an error at RSSWebPart:

"Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )"

Now web.config looks like:

<defaultProxy useDefaultCredentials="true">
      <proxy usesystemdefault="false" proxyaddress="http://<proxy>:8080" bypassonlocal="true" />

And user account under which Application pool is running has internet access.

Any ideas? Can I set user credentials in web.config?

Generation of proxy class using svcutil


Hello All,

I created a simple host application for hosting a class of mine. I have created endpoint, address binding and contract.

I am able to use svcutil to generate a proxy class. I am able to connect to the host application from my client, when both are put up onthe same machine. But when I try to host the application on my PC and try to obtain proxy class by running svcutil on someo ther machine, I am not able to generate the .cs and .config file.

Can u pls help.. as to what setting i have to change in order to generate the config file on the other machine.



Error Message - The document at the url ________ (request URL) was not recognized as a known document type.

-Report from the url __________ is ' The document format is not recognised ( the content type is text/htmll charset  = utf-8)

- Report from Disco Document = there was an error downloading ____ url ? disco

XMLSerializer: Losing data from a generated web service proxy using svcutil


I generated a proxy using svcutil with the option ser:XmlSerializer.  When trying to serialize the object I am losing data.  The wsdl came from a .asmx web service.

The request failed with HTTP status 407: Proxy Authentication Required (the ISA server requires auth


I'm new to webservice. I writed an example to work with a web service which is supplied on Internet (its url: http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx ) when i tried running i got an error message as System.Net.WebException was unhandled
  Message="The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )."

I had found some solutions such as:
+ using ISA firewall
+ configuring proxy from Machine.config
+ inside coding

The first:  I used ISA firewall but i still got the same error, my problem didn't resolve. I guessed that is because ISA firewall needn't use Credentials (username/password).

The second:
 I tried coding in my source, it was okie. This solution is good because following this way i can get defaultCredentials from cache but needn't define straightforwardly my credentials as username/password
my code is as follows:

DelayedStockQuote wsStock =

Explained: Forms Authentication in ASP.NET

This module explains how forms authentication works in ASP.NET version 2.0. It explains how IIS and ASP.NET authentication work together, and it explains the role and operation of the FormsAuthenticationModule class.

Using Forms Authentication in ASP.NET - Part 1

Classic ASP developers often had to "roll their own" authentication scheme, however, in ASP.NET much of the grunt work has been taken out. This article outlines how things have changed and how FormsAuthentication can be used to secure a Web site with a minimal amount of code.

ASP.NET Forms Authentication - Part 1

Often, in legacy Web applications, users authenticate themselves via a Web form. This Web form submits the user's credentials to business logic that determines their authorization level. Upon successful authentication, the application then submits a ticket in the form of a cookie, albeit a hard cookie or session variable. This ticket contains anything from just a valid session identification access token to customized personalization values.

ASP.NET forms authentication with roles

.A timeout is specified in minutes. This is "time since last request" not the "time since login". If a login is indicated to be persistent (described later) this is ignored.
.A protection method is specified for the cookie.
Next I wanted to specify a folder to which access is restricted to people who have logged in. To do this I entered the following code in the web.config file (beneath

Forms Authentication in ASP.NET

In this tutorial you will learn about Forms Authentication in ASP.NET 2.0 - Forms Authentication class, Cookie Domain, Forms Cookies, The Login Control, Signin, Signout, Authenticate, Redirect, Login Status, Login Name and Login View Controls.

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 ^^,

deploying to msdeploy does not support a proxy server


I am trying to deploy through webmatrix but my system Proxy server configuration is not being used. I assume that webmatrix would detect the proxy server settings and use that for the msdeploy calls under the hood. Can anyone confirm this is a know issue? 

Problems with Forms Authentication in DD 4 site


Hello,  I am seeing a strange problem with Forms Authentication in my DD site.   A user logs into and can view/edit/delete data all day, but when they execute a Custom Filter against data (for example , a control DynamicData/Filters/CustomerLastNameSearch.ascx ) then the site auth fails, and redirects to the log in screen.

in web.config I have

     <authentication mode="Forms">
            <forms name=".Star" loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" path="/" timeout="43200" cookieless="UseCookies" />     

Offhand, I am thinking two things : that DynamicData/Filters path requires some special handling for some reason, or the control extension ascx is causing auth to get confused.   Has anyone else experienced this or have any suggestions?  Thanks!

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