|
I know its bad form to give myself a self-bump but please can someone just give me a hint? The problem seems to be that my child application is running on the same thread as the parent, therefore only one of them can process input at a time. Do I need to somehow start the appdomain in a different thread? I thought threads were inside of appdomains.
|
|
|
|
|
Dear friends,
I'm developing windows application using Visual Studio 2005 and I want to know how can I write help sentences to be produced finally at the end of development as chm help file.
In other words,
How can I create chm file while developing a windows application?
Mohammed Emam
.NET Developer
|
|
|
|
|
You create those chm files by using Microsoft's HTML Workshop (google it).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I am developing a C# app which will download Rapidshare files for Free users. The program would work as follows:
1. Rapidshare webpage would open in WebBrowser control.
2. Captcha would be input in the webpage
3. File download will occur using the download manager of the app, instead of the default download manager.
I have designed the download section in the following way.
<br />
private void rapidWebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)<br />
<br />
{<br />
<br />
string filename = @"C:\test.rar";<br />
<br />
Regex pattern = new Regex(@"http://([0-9a-zA-Z]+)\.rapidshare\.(com|de)/files/([0-9]+)/([0-9]+)/([^\r\n]+)", RegexOptions.IgnoreCase);<br />
<br />
string match = e.Url.AbsoluteUri;<br />
<br />
if (pattern.IsMatch(match))<br />
<br />
{<br />
<br />
e.Cancel = true;<br />
<br />
WebClient client = new WebClient();<br />
<br />
Uri uri = new Uri(match);<br />
<br />
client.DownloadFileAsync(uri, filename);<br />
<br />
}<br />
<br />
}<br />
<br />
While running, the app downloads a 10KB file instead of the real one. If I use the followsing code:
<br />
private void rapidWebBrowser_FileDownload(object sender, EventArgs e)<br />
<br />
{<br />
<br />
Regex pattern = new Regex(@"http://([0-9a-zA-Z]+)\.rapidshare\.(com|de)/files/([0-9]+)/([0-9]+)/([^\r\n]+)", RegexOptions.IgnoreCase);<br />
<br />
if (pattern.IsMatch(match))
<br />
{ <br />
<br />
WebClient client = new WebClient();<br />
<br />
Uri uri = new Uri(match);<br />
<br />
client.DownloadFileAsync(uri, filename);<br />
<br />
}<br />
<br />
}<br />
<br />
the app downloads a 10KB file and pops up IE's default download manager.
How to solve the problem? I want to intercept the original file download by WebBrowser control, and pass the url to my app's custom downloader suppressing the IE's downloader. How to do this?
I am eagerly waiting for the solution. Thank you in advance.
Anindya Chatterjee
|
|
|
|
|
Anindya Chatterjee wrote: While running, the app downloads a 10KB file instead of the real one.
10kb file containing what?
led mike
|
|
|
|
|
The 10KB file has the same extension as the real one. But when I change its extension to "html" and open it into IE, a rapidshare page opens telling:
Your IP address ***.***.***.*** is already downloading a file. You have to wait until it is finished.
Premium-accounts can download many files at the same time. Get your own premium-account now. Instant download-access!
[Original IP is replaced by *, it is confirmed that no ther RS download is going on at that time. I am not using any kind of proxy. This IP is for my own.]
I don't know why this is happenning. More thing to notice during Rapidshare happy hour time the file is downloaded successfully, but when CAPTCHA is used this thing happens and downloads never get successful.
Help plz..
Anindya Chatterjee
|
|
|
|
|
Anindya Chatterjee wrote: Your IP address ***.***.***.*** is already downloading a file. You have to wait until it is finished.
First you cannot believe that message.
Anindya Chatterjee wrote: I don't know why this is happenning.
Second there are any number of HTTP headers and/or sections they might use to deny your request. Have you sniffed successful downloads using a browser to see what Headers / Sections are present? Unless RapidShare documents an API that is probably the only way you are going to figure it out.
led mike
|
|
|
|
|
I have seen a Orbit downloader log while downloading a rapidshare file:
2008-05-06 02:17:07 Connecting rs266gc.rapidshare.com:80
2008-05-06 02:17:08 Connected
2008-05-06 02:17:08 POST /files/96986359/1517356/MyPet.rar HTTP/1.1
2008-05-06 02:17:08 Host: rs266gc.rapidshare.com
2008-05-06 02:17:08 Referer: http://rs266.rapidshare.com/files/96986359/MyPet.rar
2008-05-06 02:17:08 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
2008-05-06 02:17:08 Content-Length: 66
2008-05-06 02:17:08 Content-Type: application/x-www-form-urlencoded
2008-05-06 02:17:08 Accept: */*
2008-05-06 02:17:08 Pragma: no-cache
2008-05-06 02:17:08 Cache-Control: no-cache
2008-05-06 02:17:08 Connection: close
2008-05-06 02:17:08 HTTP/1.1 200 OK
2008-05-06 02:17:08 Date: Mon, 05 May 2008 20:46:37 GMT
2008-05-06 02:17:08 Connection: close
2008-05-06 02:17:08 Content-Type: application/octet-stream
2008-05-06 02:17:08 Accept-Ranges: bytes
2008-05-06 02:17:08 Content-Disposition: Attachment; filename=MyPet.rar
2008-05-06 02:17:08 Content-Length: 5518769
2008-05-06 02:17:08 Start receiving data
How to use this in my C# App? I don't know. Help plz.
Anindya Chatterjee
|
|
|
|
|
The lines in the log look like a DateTime stamp followed by HTTP headers. If you use HttpWebRequest you can access/change HTTP header information.
The problem you are having is this.
You open a WebBrowser control, launch the page and the user enters the catchup info and clicks download. When this finishes you capture the URL of the file once it is suppose to start downloading, that is the Navigating event you captured. You cancel that request (ending the server connection) and then try to launch a web client to download from the now expired URL. I seem to recall sending e.Cancel=true; is the same as pressing the "Stop" button inside IE.
What you might try doing, without getting into the HTTP headers is just move the e.Cancel=true; below your web client download (since you never opened the page, it might let you download it)
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Yes, Ofcourse it will download, but with the default download manager of IE. I don't want this. I want to download it by the app itself. Problem is that catching the direct link of the file on Rapidshare server, I am not able to download it. I think you get my point and that is here I am stuck.
Anindya Chatterjee
|
|
|
|
|
No, it won't download in IE until the Navigating event exits.
I'm asking you to do the following:
private void rapidWebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
string filename = @"C:\test.rar";
Regex pattern = new Regex(@"http://([0-9a-zA-Z]+)\.rapidshare\.(com|de)/files/([0-9]+)/([0-9]+)/([^\r\n]+)", RegexOptions.IgnoreCase);
string match = e.Url.AbsoluteUri;
if (pattern.IsMatch(match))
{
WebClient client = new WebClient();
Uri uri = new Uri(match);
client.DownloadFileAsync(uri, filename);
e.Cancel = true;
}
}
and if this doesn't work, you can use download and use WireShark[^] and WinPCap to record a successful request from within IE and reverse engineer the "good" request header requirements and you're set. You might also be able to use FireFox with live HTTP headers plugin that allows you to view HTTP data...
Yet if not canceling the event until AFTER your file download fixes the problem; none of the header stuff would be required.
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Sorry this has nothing todo with the OP's questions but....
Why is it called "rapidWebBrowser" when it prevents downloading rapidshare files??
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
He can call it anything he wants .
|
|
|
|
|
Like "Fatty McCheese's Big Browser"?
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
or someone having public enum myBool{ TRUE, FALSE, FILE_NOT_FOUND } (yes people do this!, one example was on thedailywtf.com awhile back)
Mine was more of a retorical question...
Let make a bool and call it "bSaveData" but only save the data when it is false! I mean why do people do these things
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Spacix
One wrote: I mean why do people do these things
I know that one. Because, clowns to the left of me monkeys to the right, here I am stuck in the middle with you.
led mike
|
|
|
|
|
if(B<sup>2</sup>||~(B<sup>2</sup>))
{
:rose:
}
else
{
X|
}
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Hello Everyone,
I am attempting to set up WatiN in VS 2008 using NUnit (v. 2.4.7.0) as a driver. My target Framework is .Net 2.0. At this point, my code is very simple:
using System;
using NUnit.Framework;
using WatiN.Core;
namespace WatiNNUnitDemo
{
[TestFixture]
public class WatiNNunit
{
[Test]
[STAThread]
public void WatiNTest()
{
IE ie = new IE("http://www.google.com");
}
}
}
When I attempt to run this I get the following error:
System.IO.FileLoadException: Could not load file or assembly 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor(String url)
at WatiNNUnitDemo.WatiNNunit.WatiNTest() in WatiNNunit.cs: line 14
I have already added a StrongNameKey to the file in question. In fact, if I go to the properties for the Interop.SHDocVw reference, the 'Strong Name' property is set to true. I'm not sure if this is an NUnit or a VS issue. Just a note, I have created a config file for the threading issue. Has anyone else experienced this and have you came up with any possible solutions? I'm pretty much lost, and any input would be greatly appreciated.
Thanks,
-Drew
|
|
|
|
|
Hi Guys,
I'm using the Exception Handling application block to log exceptions to a file, and when the log is ready to submit, it will post it over the wire and delete the file.
Unfortunately, the Exception Handling block does not release the file until the application is closed, so i can't open to send, or delete it as i get a "File Already Open" IO exception.
Any ideas how to close the file in the logging block?
cheers
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
modified on Tuesday, May 6, 2008 11:50 AM
|
|
|
|
|
I'm guessing that the trace listener that you're using is keeping the file open for performance reasons. You can create your own trace listener that does it the way you want. But, why don't you just use the MsmqTraceListener instead?
|
|
|
|
|
Can i use it to append to a log file? Looks like a lot of unescessary work when all i want is a flat file.
I can't seem to get a handle on the writer to close it without disposing it. Any ideas?
As a note, this is a client application that works in disconnected mode, so i need to store the log for transmittion if it's not connected, and transmit when the application is closed and connected.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Hi guys,
I need capture IEs stop button in my BHO. I have not found any event that I could use.
Can you help me? Or some link.
Thanks
spacer
|
|
|
|
|
I seem to remember that the stop message is a command sent through the message pump. Open IE, capture, and then look for it in Spy++ window messages (I don't have the time to do it for you right now)
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
you can use progressChanged event (if Progress = -1)
but this event is fired both on stopping navigation and on downloadcompeleted
Houssem.
|
|
|
|
|
Hello
I am wondering if anybody can please help me with the following;
1) How do I attach a signature to a outbound e - mail message using for instance the System.Web.Mail namespace? Should I use another namespace? There does not appear to be a member with which one can accomplish this in the above - mentioned namespace.
Thanking you in advance
ChristiaanS
ChristiaanS
|
|
|
|