|
Can someone help me understand why HttpWebRequest doesn't return the same thing as IE with some sites?
I'm writing an app to rip some of Microsoft's online help pages. The URL I have works fine in IE or Mozilla, but when I try it with an HttpWebRequest it doesn't come back quite right.
<br />
http:
Please help me!!!
|
|
|
|
|
I have figured it out. I downloaded a Firebird extension that allows you to view the headers. After that, I just copied every single header value in the successful GET request into my program and it worked. I finally narrowed it down to the following header values that are required.
Accept-Language: en-us,en (of course, this is region specific)
User-Agent: (This can be set to whatever you want. I started with the standard "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)". After I got it working I changed it to "Bob's browser" and it still worked. Therefore, it's required, but doesn't need a specific value.)
|
|
|
|
|
We just started writing our Windows Apps in C# instead of VC++. We do a lot of string parsing and was shocked to see that the .NET String classes don't appear to have Find, Mid, Left, Right etc... How can you disect strings without those functions? Thanks
|
|
|
|
|
stephen wilkerson wrote:
We do a lot of string parsing and was shocked to see that the .NET String classes don't appear to have Find, Mid, Left, Right etc... How can you disect strings without those functions?
They do - but they're named differently, and are members of the String class.
Find=IndexOf, LastIndexOf, IndexOfAny
Mid=SubString(int startIndex, int length)
Left=SubString(int startIndex, int length)
Right=SubString(int startIndex)
|
|
|
|
|
also check out Regex
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
hdc1=pic1.handle '?
hdc2=pic2.handle '?
nRet = BitBlt(hDC2, 0, 0, SrcW, SrcH, hDC1, 0, 0, SRCCOPY)
|
|
|
|
|
in c# it would be:
Graphics g = Graphics.FromImage(MyImage);<br />
dc = g.GetHdc();
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hello,
I would like to learn .NET programming. I am an intermediate level C++ programmer. Currently I am looking at this book that I heard good things about:
Programming Microsoft .NET by Jeff Prosise
Has anyone read this book or can recommend a different one?
Thanx for the help.
-Flack
|
|
|
|
|
I've not read the book by Prosise you mention.
I've read "Applied Microsoft .NET Framework Programming" by Jeffrey Richter which I think is really good. You might substitute this for one of my earlier recommendations. As you are an intermediate C++ programmer, I'm guessing you probably need less hand holding as you get up-to-speed on C# and .NET. In which case ignore my recommendation for "Microsoft Visual C#.NET Step By Step" and go for the "Applied Microsoft .NET Framework Programming" by Jeffrey Richter instead. Its got most of the information, but explains it more in depth and less Click-X-then-select-Y-and-finally-push-Z.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Oh! Yes... I forgot....
You can also get a lot of good information on this web site[^]
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Hello,
I'm looking for some pointers to the correct documentation. I want to map a key combination globally within windows in order to perform some arbitrary function that I define. Any pointers to the correct docs or examples would be great.
I'm looking to do this in C#, but I'll accept C/C++ also.
Regards,
Colin.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Check out the RegisterHotKey[^] method and its corresponding WM_HOTKEY[^] message. These can be used from both C/C++ and C#, although in C# you have to subclass your window to get access to the messages.
|
|
|
|
|
That looks like what I am looking for. Thanks.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Hi,
Have just installed Visual Studio, and when I try to
start a new project I get the following error message:
Visual Studio.NET has detected that the specified web
server is not running ASP.NET version 1.1
You will be unable to run ASP.NET applications or services
Any idea how to update this?
Running XP Pro with latest version of IIS
Regards,
Ken Iversen - Cairns
|
|
|
|
|
Is ASP.NET installed on the IIS? This can be checked in the Properties of the default website(?) in the IIS, but sadly I can't give you the full path because my IIS is german... If you do not find anything pointing to the .NET-Framework, then try
aspnet_regiis -i
from the %SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322
For my Installation this did the trick, and I've installed VS.NET first, then the IIS.
|
|
|
|
|
Just want to say thanks. I had done the same order as you installed vs.net first and then added IIS. Doing a reinstall apparently does not "install" the servcies to IIS. On my test box IIS had been installed first and all was fine but could not get things set up on my dev box.
ThoWeib wrote:
aspnet_regiis -i
Is just what I had been missing.
"Don't be so anti-american, would you?
KaЯl (to Paul Watson on Baseball Bats) 26 Nov '03 "
|
|
|
|
|
Hi everyone,
Given a row, how can I know the position of it in the table? for example.
MyDataSet.EmployeesRow row = myDataSet.Employees.FindByID(30);
what is the position of the row in the table?
Thanks in advance.
|
|
|
|
|
Please forgive the very newbie question, but is there any possible way to compile an application in VS.NET that does not require the end user to install the .NET Framework in order to run the application?
Tony
|
|
|
|
|
Only if your language of choice is C++.
C#, VB.NET, J#, and managed C++ all compile to an intermediate language (MSIL), which is then just-in-time compiled to machine code as the app is run by the end user.
Without the .NET framework installed on the computer running the .exe, the machine wouldn't know what to do with the MSIL, or have the resources to execute it.
Charlie
if(!curlies){ return; }
|
|
|
|
|
I know this has been asked before somewhere, but I can't find it. I'm running a windows-forms based application where the assemblies are located on a network share and all client PCs are setup to run the application from the network so I have only one copy of exes, dlls, etc. This works fine.
However, I can't copy new DLLs into place unless everyone closes their application. The DLLs are in use and the copy fails with "Sharing violation".
I was hoping that .NET would handle this someway so that I could run fat clients, yet have a single location for program files and be able to copy changes out without having to have everyone shutdown the application.
Help anyone?
Barry Etter
|
|
|
|
|
|
I’ve realy got problem searching for help in the MSDN for .NET stuff. I sure have the right version.
Earlier when searching for MFC classes there was no problem. Eg searching for an FTP class I directly find CInternetSession and so on…. but where to find about FTP in the .NET Framework??
using System.Windows…???….
.....and justice for all
APe
|
|
|
|
|
Figuring out the organization of the framework takes a little time.
In your particular case, there really isn't a FTP class in the framework. You might be able to get some of the classes to download files, but I've never tried it.
In any event, I did a search and came across THIS. I've never personally used it, but it might help you.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
The .Net Framework does not have any FTP support at this time. Not implying that it ever will.
However, there is a C# FTP sample on this site. Somewhere.
/\ |_ E X E GG
|
|
|
|
|
This site??
Where?
.....and justice for all
APe
|
|
|
|