As SAK points out: you really need to clarify which technology, WPF, or WinForms, you are using here.
And, most important you need to tell us:
1. You wrote:
"I am calling the webservice for getting the byte array stream and after getting this Byte stream , i need to convert the byte stream to base64string and save this into local file with appropriate file format."
This elaborate transformation system suggests to me ... that if we knew exactly what format the original data was in, we "might" be able to help you reduce the complexity of the process you describe here. If the source is already some kind of file: what type of file is it ?
2.
what the file-type format you are going to display ultimately in the WebBrowser is: is it HTML ... or ?
... which leads to ...
I am sure you are already aware of displaying Office files via VSTO Automation in a a Web-Browser, or strategies to show PDF files using Adobe's api's. You are probably aware there are 3rd. party commercial tools that will convert RTF and HTML back-and-forth.
Are you, also, aware that in both WinForms and WPF the WebBrowser Control can display certain file types ... that are NOT HTML ... directly: for example, graphics files, .png, .jpg. And, text files. In WPF you may get a dialog pop-up, based on your security settings (I guess) that asks you if want to "download" the file: I do not get this dialog in WinForms on the same machine with the same security settings.
I have not looked, in a while to see all the other non-HTML file types the currrent versions of the WebBrowser Control will display: last time I looked, in WinForms, trying to display an RTF file would simply launch the default RTF viewer, which is not surprising.
In WinForms, you can set the 'URL property of the WebBrowser Control to a valid file path: in WPF you can set the 'Source property of the WebBrowser Control to a valid path file path.
Example: in WPF:
<window x:class="TestWBinWPF.MainWindow" xmlns:x="#unknown">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<grid>
<webbrowser height="311" horizontalalignment="Left" name="webBrowser1">
VerticalAlignment="Top" Width="503"
Source="C:\Users\Ur\Desktop\Graphics\Bill.png" />
</webbrowser></grid>
</window>
In a WinForms (Designer.cs view): here's what you might see generated:
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(1166, 552);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.Url = new System.Uri("file:///C:\\Users\\Ur\\Desktop\\Graphics\\Bill.png", System.UriKind.Absolute);