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


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

Http proxy for SSL using relay method on chunked transfer

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :.NET Framework
 

hi,

 

I'm working on a proxy application; everything works find but ssl connections. here is what i'm doing and the problem description:

The proxy detects Connect request from browser and starts to relay ssl traffic to an external server and then receives the answer then sends the response directly to browser:

The request: Browser Ssl request <--> proxy application <--> external proxy server <--> remote website

I could implement ssl data relay (without touching any byte of it), but it only works for images and a few html pages.

I've checked the transferred data with Wireshark and Fiddler, they reports that all the traffic is sent ok and the data size was ok. But browser only displays direct request to images. (e.g: https://a.fsdn.com/sf/images/develop/logo.png)

 

Here is my guess about the issue:

I'm buffering all response/request traffic, when buffering is done the app sends it to proxy server/browser. After one full day investigation i realized that the browser only receives the very first part of request for html pages. In my opinion it receives only first chunk of response (but the response in not sent in chunks!) this is what i guess though!

I'm using TcpListener for both Proxy App and Proxy Server.

Please help me through this; what should I do ? :(

Many


View Complete Post


More Related Resource Links

How do I get the http method?

  

Hi,

I've a problem to get the http method.

I would like to know how do I test if the page send to my website is "post", "get" or "head", and I would like to stop the process if the page is "head".

Can you help me?

Thanks by advance. 


calling WCF service Method in HTTP GET by browser or ASP.NET ( like HttpWebRequest for example)

  
Can i call a WCF service Method using HTTP GET by browser or ASP.NET (without WCF Client)? it can be done with asmx web service.... but i can't find a way to call a WCF service Method with HTTP GET through the browser or C# ASP.NET Code... can i do that ?

Overload POST with X-HTTP-Method-Override as DELETE

  
Hi, How do I pass POST with the override header, X-HTTP-Method-Override, which will say I really mean DELETE in REST WCF 3.5? What changes are needed exactly in server side REST code & where to make those changes exactly? Can some one post code snippet? Thanks!

WCF proxy generation encapsulates original method using MessageContracts

  
I am having an issue generating the client proxy for a set of WCF services. I am sending a MessageContract as a parameter to the service and returning a MessageContract. The generated proxy has the resulting method as private and generates another public method that accepts all the properties of the message as individual parameters, then assembles the MessageContract, and calls the private method. I can’t seem to figure out how to get it to generate a proxy with original signature for the method.   My message contracts are thus:      [MessageContract(IsWrapped=false)]    public class FlashFileMessage    {       [MessageHeader]       public string Filename { get; set; }         [MessageHeader]       public long FileSize { get; set; }         [MessageBodyMember]       public Stream Data { get; set; }    }      [MessageContract(IsWrapped=false)]    public class TransferFileToInstrumentResponse    {       [MessageHeader]       public bool Success { get; set; }         [MessageBodyMember]       public string Message { get; set; } &n

WCF Basic Http Binding - Two server requests per method call

  
We have a service that uses BasicHttpBinding/Transport Security/Windows Authentication and is hosted in IIS. I have created a unit-test application in VSTS and whenever we test a WCF method, Fiddler records two calls. 1st call - No authorization token is sent. The WCF service returns a 401 error - Unauthorized: Access is denied. Http headers as sent in the request given below. POST http://localhost/AccountScreen.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "IAccountScreen/RetrieveAccountDetails" Host: localhost Content-Length: 243 Expect: 100-continue Connection: Keep-Alive 2nd call - Authorization token is sent and the WCF service returns the expected response. POST http://localhost/AccountScreen.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "IAccountScreen/RetrieveAccountDetails" Authorization: Negotiate Host: localhost Content-Length: 243 Expect: 100-continue I am not able to figure out why there are two calls made to the server in the first place and what is the significance of the first call. Any thoughts?

Need help in Webservices.How to make external Web Services method call in case of proxy in Asp.net 2

  

How to make external Web Services method call in case of proxy in Asp.net 2.0? 

 

The scenario is I have webservice Client dll.Now when  i Invoke the One of the Method in Client.dll,its not sending the request to server bcz the system is blocked with Proxy settings.I need to know call this method by bypassing the Proxy settings.

@Note:The client.dll is in different location.we are trying to contact the server with this dll.but its not contacting

pls help .its deeply appreciated .

 

Thanks

 

 


create web service with http-post method

  

hi All,

we need to expose a web service to the 3rd party vendor which can only call using POST protocol, NOT SOAP.

So my question, is it better to build a web service or just simply .aspx page?

Also is there any best practice documentation on this.

 

Thanks.


pass a dynamic parameter in a WCF method on HTTP GET

  

i have a WCF method with 2 known parameters and another one thats supposed to include a Key:Value pairs (dynamic parameter that will include an unknown number of key:value pairs).

the first question is :

i don't want to use XML as the dynamic parameter. what is the common way to pass the dynamic parameter in a WCF method? Dictionary<string,String>? json string? array of complex types? or other? ( my client - the one that uses my service, doesn't have Framework 3.5, so i suggested a framework 2.0 ways to send the parameter)

the second question :

the method  supports HTTP GET , should a dynamic parameter be passed in the URL itself or in the Header? i prefer the URL itself....

 

thank guys, please help ....


How to call a webService Method Using Http get Protocol

  

Hi,

I have Created A simple WebService Method Like If a Pass Id it will return Name Of the Employee from database.

That webService is Working Fine i ahve Tested It.

My Question is Now I haveto call this webservice using HttpGet Protocol from CLient Application.

 

please provide me some samples on it.

 

Regards,

Amar


Thanks&Regards, -Amar.

Which method is better to transfer user to there home page after taking there credentials ?

  

Hi,

i am developing a login page.After matching there given and actual credentials i have to show there own private page.So which method should i use now.Which is better one ?

Server.Transfer of Response.Redirect ?

How can i access login page's data in the user's home page if i use Server.Transer method without using Session variable ? 


Abort() method of wcf client proxy doesn't release session after catching FaultException

  

Hello,

I have created a simple wcf service hosted in IIS and wcf client and figured out that when u catch a FaultException from the wcf service and then call client.Abort() to release the session (as the microsoft samples said) it doesn't release the session and hangs up on the 11th call.

Here is example:

Wcf Service:

[ServiceContract]   
public interface IService1 
{ 
    [OperationContract] 
    string GetData(int value); 
} 
 
 
public class Service1 : <

Abort() method of wcf client proxy doesn't release session after catching FaultException

  

Hello,

I have created a simple wcf service hosted in IIS and wcf client and figured out that when u catch a FaultException from the wcf service and then call client.Abort() to release the session (as the microsoft samples said) it doesn't release the session and hangs up on the 11th call.

Here is example:

Wcf Service:

[ServiceContract]   
public interface IService1 
{ 
    [OperationContract] 
    string GetData(int value); 
} 
 
 
public class Service1 : <

How do I use x-http-method-override for a REST service in WCF 4.0

  

Back in WCF 3.5 using the WCF REST Starter Kit, I was able to create a request interceptor to handle x-http-method-override headers for clients that cannot send PUT or DELETE commands.  How do I do the equivalent in WCF 4.0?


SoapAction: http://schemas.microsoft.com/sharepoint/soap/GetListItemChangesSinceToken | This method

  

HI,

i installed Sharepoint Foundation 2010 on Windows SRV 2008R2 (Single Server installation. No Sharepoint Farm). After the installation I extended my WebAppPool in order to get the same page with port 443. I already troubleshooted some problems and now everything is fine except this one. Here is a short overview about what has been done after the installation:

1. Deploy a single server with a built-in database (SharePoint Foundation 2010) (Technet = http://technet.microsoft.com/en-us/library/cc288005.aspx)

2. Initial configuration (SharePoint Foundation 2010) (Technet = http://technet.microsoft.com/en-us/library/ee837435.aspx)

3. Extend the Web Application (Uses Windows-classic authentication) (Technet = http://technet.microsoft.com/en-us/library/gg276321.aspx)

4. Changed Central Admin Service Account, Changed MyWebAppPool Service Account, Changed Search Service Service Account + Crawle

Need help with C# FTP upload via an http proxy : InvalidOperationException

  

All,

 

I am writing a piece of C# code that uses the FTP functionality to upload files, but I'm getting an error because I have I'm set up to use an HTTP proxy.  I'm currently using Visual Studio 2003.  Here is a snippet of the code I've written (ok, that I've borrowed):

 

======================================================== 

 

// Get the object used to communicate with the server.

FtpWebRequest myFtpRequest =

(FtpWebRequest)WebRequest.Create(sevderComFtp);

 

myFtpRequest.Method = WebRequestMethods.Ftp.UploadFile;

 

myFtpRequest.Credentials = new NetworkCredential("anonymous", "anonymous");

 

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 =

Thinking about new C# method prototypes: object as dictionary

  
I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.
Categories: 
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