|
I have solved the mystery...
The problem was not in the code above, but in what was done with the response stream, which is in XML. Unfortunately, that XML contains a DTD that was causing the problem, when the XmlDocument class tried to retrieve it and failed (because it's not using the proxy credentials properly).
And, of course, the "difference" was that in my console app I was just spitting the XML onto the screen, not loading an XmlDocument class.
Thanks for the help for those who looked, though...
|
|
|
|
|
Timothy CIAN wrote: And, of course, the "difference" was that in my console app I was just spitting
the XML onto the screen, not loading an XmlDocument class.
Ahh...
When I deliver a windows service I deliver it with a corresponding console app.
The service code and the console code do nothing except call to the real functionality of the system.
|
|
|
|
|
Hopefully no one minds if I put this here and hopefully someone knows the answer. I'm trying to do it in C#. I put it on Technet, but no replys yet. There does not seem to be any reference to this on the web.
I have a real problem. I have Visual Studio 2010 Professional (on Windows 7 Proefessional). If I try to open a .CS file of a project from the Solution Explorer, I get the message (that can't be copied and pasted). The same thing happens if I try to start a new project.
Could not load file or assembly 'Microsoft MSXML, Version=8.0.0.0, Culture=neutral, PublicKey Token=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
I researched this on the web and it's about the MS XML parser (web messages about that are complicated with 4 versions of the dll). c:\windows\assembly\Microsoft.MSXML. I cannot find anything about this error message. I reloaded SP1 for luck... That got me a new message about some editor software not loading correctly, but did not fix the problem.
It used to work right. I made no environment changes that I know of. This is a simple Windows application, but it has the same failure when trying to open a *.aspx.cs file. When trying to open a .ASPX file, the error message is: Visual Studio has encountered an unexpected error. Helpful, that one.
I don't really want to re-install Visual Studio (wherever the disk is right now).
Notice that it says the problem is the assembly manifest.
Anyway, any thoughts would be really appreciated.
Thanks, Mike
|
|
|
|
|
Try this[^] one.
Member 7980583 wrote: I don't really want to re-install Visual Studio (wherever the disk is right now).
One install per license. If the disc is lost, the installation is lost.
Seen one too many software-shop that does "everything" to prevent pirating their product while using illegal version of Windows/Visual Studio/Sql Server..
Bastard Programmer from Hell
|
|
|
|
|
I think I tried that, but it didn't fix it. I did reboot to make sure.
Can't believe no one has see this before.
|
|
|
|
|
Aw, many have seen this before, and most of the time it's fixed with updating the MS XML libraries. If doesn't, chances are that your program requires a specific version.
Bastard Programmer from Hell
|
|
|
|
|
I installed Visual Studio 2010 Express and my Visual Studio 2010 Professional worked.
|
|
|
|
|
Hello, I am making some program where I am using zedgraph libraries. And I have a little problem on clearing curves. When form loads I add graph and I want to clear the curves when I press the button Clear and then press Start start over again. Creating graph there is now problem but when I press Clear and Start again it doesn't start again. I give you some fragments of the code how I clear it.
private void Clear_Click(object sender, EventArgs e)
{
zg1.GraphPane.CurveList.Clear();
zg1.GraphPane.GraphObjList.Clear();
zg1.Invalidate();
}
|
|
|
|
|
I'm not familiar with the control; however, one should be able to remote the entire control and create a new one. Have you tried creating a new ZegGraph ?
Bastard Programmer from Hell
|
|
|
|
|
hot to get processor ID in C#
|
|
|
|
|
|
If you're talking about getting the capabilities of the processor, please continue reading the link posted by the other responder.
If you're talking about getting the processor serial number (CPUID), don't bother. Only Intel and Transmeta ever implemented it for a short time in certain CPU models. Intel doesn't even implement it in the latest CPUs and AMD never implemented it at all. It's utterly useless to identify a machine uniquely.
|
|
|
|
|
Hello
Add the System.Management reference
And use the following code
public static String GetCPUId()
{
String processorID = "";
ManagementObjectSearcher searcher = new ManagementObjectSearcher(
"Select * FROM WIN32_Processor");
ManagementObjectCollection mObject = searcher.Get();
foreach (ManagementObject obj in mObject)
{
processorID = obj["ProcessorId"].ToString();
}
return processorID;
}
P.S :
Some CPU didn't support the CPUID instruction, in which case, the call can't be guaranteed to succeed.
|
|
|
|
|
|
This must be a certain type of test. Looks like it is successful.
I suggest that this be the end of the test.
modified 21-Feb-12 9:00am.
|
|
|
|
|
G'day,
I am writing something to deal with logged multi-user access to our social media accounts, and what I want to do is add a second textbox when the message goes over the Twitter maximum - 140.
What I have at the moment is a form with the controls anchored to their spot on the page. When the second textbox is needed, i call a timer with a 1ms trigger time to expand the size of the form by one 1 px until it's at the "large" size.
The idea behind this is to have the second textbox slide down from behind the first one.
However it is not fluid. Any ideas how I can speed it up or a better way of doing it?
Thanks!
Brendan
|
|
|
|
|
Slow the timer down.
At the moment you are asking for 1000 frames per second animation - the drawing can't keep up with that rate so it looks "jerky". Change the interval to say 40 and try again.
If may also be worth turning DoubleBuffered to true for the form - experiment. If you don't need it then don't do it as it slows drawing down.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Is there a better way of doing it?
I would like it to slide out smoothly, but also at a decent speed!
Thanks,
Brendan
|
|
|
|
|
Movies get played at 24 or 25 frames per second, which is faster than the human eye can discern, resulting in smooth films. So there is no point in having a timer period which is less than say 30 milliseconds. What you should do however, is in each repaint use the actual time, not the predicted or expected one, to calculate how the new frame should look; doing it that way you'd compensate for most of the timing jitter a Windows PC may experience.
|
|
|
|
|
I have a text file in unicode. I want to convert it in english using C# or VB. Can any one help me?
|
|
|
|
|
Probably not.
A text file in Unicode could be in English already - Unicode just specifies a the character encoding to be used to represent the data (as opposed to ASCII or similar).
If your data is in Farsi, or French, or Mandarin, then you need serious help to convert it to English!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Unicode values less than 128 are the same as ASCII (which was the most common encoding for English before Unicode). So if you take your Unicode characters and put each one in a byte and write it out, you have ASCII.
Unicode characters 128 and above can't be translated to ASCII, so you could replace these with another character (space, ?, or whatever you want).
It may be helpful to know that pure ASCII is already compatible with the UTF-8 representation of Unicode. The only difference is that non-ASCII characters will take more than one byte in UTF-8. But since you're dealing with English, they're essentially the same for your application.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
|
|
|
|
|
Hi CodeProject community,
I have been using a custom print component, which was made by 'Duncan Edwards Jones' a member from here, and it has been such a huge help in letting me print parts of my form. Now that I have been using .NET framework 4 client profile, Duncan's component doesn't seem to be compatible with it The error I receeve is "Error 2 The type or namespace name 'FormPrintComponent' could not be found (are you missing a using directive or an assembly reference?)"
I would love to use this component in the .NET Framework 4 client profile, but I don't know how to fix the error
Please help me CodeProject, thank you
Heres the custom print component in case you're wondering: Form Print Control[^]
|
|
|
|
|
For any questions on the component, you'll have to ask him about it by posting in the forum at the bottom of the article.
But, the first thing I'd do is get the source code and recompile it targeting the .NET 4.0 Client Profile. Then you could probably use it without any problems.
|
|
|
|
|
It sounds like you are doing something wrong then. I haven't used that component, nor have I studied it in any detail, however here is what should fix the problem:
1. create a Visual Studio solution
2. add Duncan's project to it, and choose the target .NET version you want
3. build it (fix any problem that may occur, none expected)
4. add your project to the solution
5. add to your project a reference to Duncan's
6. add to your source code a "using FormPrintComponent;" statement referring to Duncan's namespace
7. choose the same target .NET version as before
8. now build it all.
|
|
|
|