I've encountered an issue with HttpWebRequest that if the URI is over 2048 characters long the request fails and returns a 404 error even though the server is perfectly capable of servicing a request with a URI that long. I know this since the same URI that causes an error if submitted via HttpWebRequest works fine when pasted directly ...
Hi,
I'm trying to call a custom action within my Setup & Deployment project to update some items within the app.config on my app. I've wrapped up the custom config section in the usual way, e.g.:
[ConfigurationProperty("serviceProvider", IsRequired = true)]
public string ServiceProvider
{
get { return (string)base["serviceProvider"...
All began with these simple lines of code:
string s = "16.9";
double d = Convert.ToDouble(s);
d*=100;
The result should be 1690.0, but it's not. d is equal to 1689.9999999999998.
All I want to do is to round a double to value with 2 digit after decimal separator.
Here is my function.
private double RoundFloat(double Value)
{
floa...
Hi
Got a problem thats driving me a bit nuts here. I have a winforms project containing usercontrols, that use types from another project which is reference by add project. I have checked the references, and they are all fine, there is only one reference from the UI project to the services, and that is by adding a project reference. I c...
please this is kind of a beginners question. I have multiple tables like 5 tables related to each other in the database. I would like to create controls on a form in c# that will bind to different tables though related and they will scroll together when I move to the next item. I am kind of confused on how to go about it.
I watched this...
What I'm trying to do is to write a dedicated method for my StreamWriter instance, rather than make use of it at random points in the program. This localises the places where the class is called, as there are some bugs with the current way it's done.
Here is what I have at the moment:
public static void Write(string[] stringsToWrite) {...
I have a Binary Store in a SQL Server Table, In there I have PDF Files (in binary), what I want to do is display the PDF on a webpage in a "DIV". I dont want the user to have to press open so it opens in acrobat reader. I want a small thumbnail which they click and a model windpw opens with the PDF documet displayed as a picture. Does an...
Hi guys,
There are plenty of discussing that shows how to load assemblies from BIN and from GAC... my question is more general and I would love to know how assembly loading work.
As for example
in the BIN folder we can have
A.dll
A.dll.config
A.dll.config file can look like:
<?xml version="1.0"?>
<configuration>
<startup>
<...
Hello,
I am a .NET begginer and i'm trying to develop a webservices using C# so i can send a XML data to an specific URL.
I can't use Web Reference and i need to construct the xml data using this kind of format:
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<so...
I am writing a WPF application and need to show info about video card installed in the system. I've faced a problem that I can't get pixel version supported by current video card. How can I do this using .NET? (importing of external code, may be DirectX libs, is also a suitable solution).
...
I'm trying to load an assembly without locking the file. These assemblies could be third party assemblies so we don't necessarily have access to the code and one or two of them make use of Assembly.Location to read files from their directory, files they might depend on.
I'm aware you can do this via Shadow Copying but it's a real pain ...
In the documentation for Compare function in Comparer class it says:
If a implements IComparable, then a. CompareTo (b) is returned; otherwise, if b implements IComparable, then the negated result of b. CompareTo (a) is returned.
But when I test it It seams like it will demand that the first input implements
Icomparable. Following ...
I'm trying to understand trends of the languages. This might be not a "real programming question", but i hope people will correct me promptly.
Currently there are two languages/trends/technologies that i'm interested in: Java and .NET. These are two worlds.
There's an opinion that:
1. Java is most often used in connection with Oracle...
How do I change the default output path of a VS2008 setup-project?
It installs into Program Files\myOldProjectName right now.
...
Can someone please explain to me why minimizing a windows app massively reduces the memory usage?
For example, I run Visual Studio showing 800MB memory usage in Task Manager then I minimize the Visual Studio app window and the memory usage now only shows 50MB in task manager. This seems to happen in all winforms apps.
...
Followup to this question. I'd like to get a list of all files, except for files that are currently in a recycle bin.
I am able to use FileAttributes to check for hidden/system files and whatever kind of weirdness the file system provides, but the only way to check for recycled files quickly seems to be a comparison with ".:\$RECYCLE.*"...
As a training exercise, I am creating a counter that runs in a background thread, in a .NET 3.5 WPF app. The idea is that the counter gets incremented and every few seconds the total is output to the screen.
As it is a training exercise, the foreground thread doesn't really do anything, but imagine that it does!
There is a start and s...
Hi,
I am sometimes seeing an issue with Window.ShowDialog() where the window physically closes but does not return to the ShowDialog point in the code from where it was shown.
I have the following:
try
{
log.Debug("Showing new dialog window.");
result = dialogWindow.ShowDialog();
log.Debug("Closing new dialog window.");
}...
I have a .NET windows service that does a lot of network magic (WMI, Ping, etc - the list is very long). I would like to profile, with as much ease and detail as possible, how much bandwidth the application uses in total as well each part in the code.
Are there any tools that can help me do that? Ants profiler for example will help me ...
I've written a few very casual wrappers around REST and less structured web interfaces, but all just for fun, with very little attention to error detection and handling, timeouts, etc.
Can somebody please give me some pointers, either on practices, or to resources, for developing a solid, professional .NET (or other platform) wrapper fo...