|
|
Rajdeep.NET is BACK wrote: .iso files are image files
Pointing out the obivous, nice.
Rajdeep.NET is BACK wrote: Rajdeep Bhattacharjee,
MVP (Microsoft Corporation)
Grow up.
Rajdeep.NET is BACK wrote: Always ready to be helped and be helped....
You're like a parrot who repeats the same old dribble over and over.
[ADDED]
Rajdeep.NET is BACK wrote: www.cy2online.net/Snippet/CSharp/Miscellaneous/99/Read_Image_File_As_bytes.html
HAHAHAHA
Every time I think that you cannot surprise me with your stupidity, you do something like that!
My failometer has shot off the end of the scale!
I seem to have misplaced my ban button.. no wait... found it!
modified on Friday, May 29, 2009 4:36 PM
|
|
|
|
|
Rajdeep.NET is BACK wrote: MVP (Microsoft Corporation)
Yeah, right. Just putting this in your signature doesn't make it true. You're name, nor any variation, doesn't show up in the MVP Awardee list. Besides, if you were, you'd be able to prove it. So, prove it.
|
|
|
|
|
Rajdeep.NET is BACK wrote: MVP (Microsoft Corporation)
Unlike many others here I am quite prepared to believe your claim.
If MVP stands for Moronic Vacuous Pillock, that is. It is also nice to note that Microsoft agrees.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: Vacuous Pillock
Where do you get those? No, seriously. I had to google that
|
|
|
|
|
60 - some years of immersion. Some of it has to sink in.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Tool, idiot, uneducated feebled prick, stop giving advice. You are wrong, STOP giving erroneous suggestions to users who may be conned into attempting your suggestion & wasting their time under your false pretense.
|
|
|
|
|
I haven't tried this out myself but you may also be able to use 7-zip to get hold of a few file streams.
Have a look at...
http://sevenzipsharp.codeplex.com/[^]
The world is your spoon
|
|
|
|
|
Hi,
I am creating one pdf at a time in a loop . How can i download the PDF each time the pdf is created while loop is still going on
Thankss
|
|
|
|
|
I have no idea what your questions means/is asking.
|
|
|
|
|
Thank god for that! I thought it was just me.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
whatever code it takes to download a PDF, put it also in the loop, just after the code that creates it.
not sure to what you want to download, and whether download is the right word.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
If he is creating a pdf, surely he doesn't mean download as he is writing it to a location on his HD (wouldn't streamwriter or any other writer throw some sort of security exception for writing to a network share or anything else)?
Maybe he means open?
System.Diagnostics.Process.Start() ?
|
|
|
|
|
Some people use "download" to indicate a transfer to some smaller device (embedded, mobile, whatever), just like you and I "upload" things to a larger device (server, web site, ...).
In that view download/upload are unrelated to import/export, and you could create and download something.
That is how (I think) I understood his post.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Could you be more specific?
What if the world was your spoon.
What if was in your power to bend it to your liking.
What if it could provide for you whatever you asked of it.
|
|
|
|
|
I'm still trying to get a block of code that does an https file download working. The vendor (swift.com) says that they took my code and got it working on their end no problem which leads me to believe that the something that is preventing me lives on my side of the request. We have a download scanner that pops up when I load the URL in my browser, so it's possible that I'm getting blocked there but I'm still working with the security team on that one. I'd appreciate it if someone could take a look at my code below and let me know if you see anything that's wrong/missing/poorly formed for an https request. This is being run from a .NET 2.0 console application if that makes any difference. I highlighted the line in the code where the 401 Unauthorized error occurs.
I added a few hard returns to the code to keep the page from going WAY WIDE. If you pull the code down from here and past it into VS you might have to remove them.
private bool DownloadFile()
{
private const string URL = "https://www2.swift.com/bicdownload/bicdownloader?
action=getfile&productline=bicdir&product=bicdb&content=full&format=txt&platform=win";
try
{
string bicFileTemp = string.Format("{0}\\BIC-{1}.txt",
ConfigurationManager.AppSettings["BICDLPath"], DateTime.Now.ToString("dd-MMM-yyyy"));
string line;
System.Net.NetworkCredential cred = new System.Net.NetworkCredential();
cred.UserName = "myUserName";
cred.Password = "myPassword";
WebRequest myReq = WebRequest.Create(URL);
myReq.Credentials = cred;
myReq.Proxy = WebProxy.GetDefaultProxy();
myReq.Proxy.Credentials = CredentialCache.DefaultCredentials;
* ERROR HERE * WebResponse wr = myReq.GetResponse();
Stream receiveStream = wr.GetResponseStream();
StreamReader sr = new StreamReader(receiveStream, Encoding.UTF8);
StringBuilder bicFile = new StringBuilder();
do
{
line = sr.ReadLine();
bicFile.Append(line);
} while (line != null);
File.WriteAllText(bicFileTemp, bicFile.ToString());
return true;
}
catch (Exception ex)
{
Utilities.ReportError("Error in BIC-DownloadFile: " + ex.Message, this, ex.StackTrace);
return false;
}
}
Mike Devenney
modified on Friday, May 29, 2009 11:35 AM
|
|
|
|
|
The only dodgy bit I can see is the proxy. Can you try connecting directly?
If your proxy is not forwarding your credentials correctly, you will get a 401.
I forget how, but there is a way to add your username and password to the URI. It's something like https://username:password@www.... Might be worth a try.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Thanks for the reply Nick. Tried removing the Proxy but I don't get off the network if I do. Maybe embedding the credentials in the URI will work. I'll give that a go and let you know how I make out.
Mike Devenney
|
|
|
|
|
You'll have to find a computer that isn't behind your proxy. Do you run a DMZ? Or a web server? You can always try from someone's home.
I just googled the URI encoding and I got it right
http://en.wikipedia.org/wiki/URI_scheme[^]
Please let us know how you get on.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
And the games continue. My username for the SWIFT site is my password, which includes the @ sign. I got an error back saying that
a port # is expected because a colon was found in the request. I assume this is happening because of the @ in my username. Would I escape the @ character?
Mike Devenney
|
|
|
|
|
Not sure about that.
Have you tried putting the uri in a web browser?
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Before I was getting an error about having a colon in the request with no port specified. Now, I get this error from IE in a dialog box entitled Address Bar.
Windows cannot find
'https://mdevenney@wilmingtontrust.com:Password@www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdir&product=bicdb&content=full&format=txt&platform=win'. Check spelling and try again.
Mike Devenney
|
|
|
|
|
I don't know how to escape an @ in your username. I just tried putting the uri without username:password into ie8 and a dialog popped up asking for credentials. Could you try this, enter your credentials and see if you get the file?
If you do, it means your account and local network are working, which would narrow the problem down to the credentials your proxy is passing when you use WebRequest.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
I'm able to get the file using the URI and entering the credentials into the dialog that pops up. Is there any way to see what the proxy is passing?
Mike Devenney
|
|
|
|
|
You could try setting myReq.PreAuthenticate = true; Might work...
Nick
----------------------------------
Be excellent to each other
|
|
|
|