I'm having trouble with my COM component written in .NET throwing warnings that look like:
Context 0x15eec0 is disconnected. No
proxy will be used to service the
request on the COM component. This may
cause corruption or data loss. To
avoid this problem, please ensure that
all contexts/apartments stay alive
until the app...
I have next code:
static void Main(string[] args)
{
byte currency;
decimal amount;
if (Byte.TryParse("string1", out currency) && Decimal.TryParse("string2", out amount))
{
Check(currency, amount);
}
Check(currency, amount); // error's here
}
static void Check(byte b, decimal d) { }
and ge...
I want a user to be able to upload a word document and my program then parses the document into separate word documents. The problem is that the splitting will need to be manual as all the word documents are not formatted the same way. My initial thought is before the user uploads, the user tags the sections with a beginning and end tag ...
Take this enum for example:
public enum PersonName : short
{
Mike = 1,
Robert= 2
}
I wnat to have en extension method like this:
PersonName person = PersonName.Robert;
short personId = person.GetId();
//Instead of:
short personId = (short)person;
Any idea how to implement this?
it need to be generic to int, short etc...,...
How can I make a window always stay on top of another window that already always stays on top? Not that it has to stay on top of all other windows, I just need it to stay on top of a particular window.
...
I have written a .net dll that I can successfully call from vb6. Deployment to xp, vista 32, and vista 64 boxes have been working. It is not working on windows 7 64 bit. I cannot run regasm.exe /codebase name.dll on the end users machine because they are not admins. Any ideas on helping me with deployment would be greatly appreciated...
I have a class library created in .NET 4.0 When I use the Enterprise Library Configuration tool to load this assembly, I get:
Error loading assembly: Could not load file or assembly. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
I have tried the Configuraiton tool in both the Enterpri...
I've been comparing distributed caching solutions for an ASP.NET environment and would like to use something FOSS if possible. I've come across SharedCache and seen it recommended by a few people on StackOverflow.
Has anyone actually used this in a production environment? I can't find much online about the maturity of this project and...
I have a nested master page that has its own master page. The parent master page has a property defined in its code behind.
Public ReadOnly Property SelectedPage() As String
Get
Return _selectedPage
End Get
End Property
How can I reference the parent master page's property from within either the child master page's c...
My problem is with .Net Http/Uri libraries not being able to decode or unescape this character sequence: "Hi%E1".
Neither Uri.UnescapeDataString nor HttpUtility.UrlDecode can do it.
Although I have a solution to get around this problem ( http://stackoverflow.com/questions/1221849/url-decoding-confusion ) I would like to understand why ...
We are using .NET 3.5 with VS2008. I have a solution with ~20 projects in it, and that number will grow over time as the application grows and adds new modules. Today I needed to set a property on every project. I had to edit each csproj file to add the following:
<Target Name="BeforeBuild">
<CreateProperty Condition=" '$(Solut...
After participating in the debate in this fiascoquestion, I would like to posit the question before the entire community.
In what scenarios will tail-call optimization be applied to .Net-based code?
Please support your answers with reliable, up-to-date sources or reproducible experiments.
...
Hi everybody,
if I want to partially download a file and define a single range in the request Header, I get
the byte-stream of the requested file in the response body.
But if i specify multiple ranges as below, I always get for each defined range an additional
response header (wich describes the requested range) within the response bo...
Given json like this:
[["Rating (out of 5)","3"],["Date taken","Mon, 03 Mar 2003 03:04:03 GMT"]]
What is the best way to deserialize it into something like Dictionary<string, string> or should I be using a different data structure?
I'd probably prefer to use the .net Serializer but will consider other options if this wont work.
...
Hi All,
I know the similar question may have been asked many times, but I want to represent the behavior I'm seeing and find if somebody can help predict the cause of this.
I am writing a windows service which connects to other windows service over TCP.
There are 100 user entities of this, and 5 connections per each. These users perfor...
And what is the main difference between Trace.Write and Debug.Write?
Thanks!
...
This is more an MBCS question than a Unicode question. I need to create an API that returns a list of structs that each instance holds a Unicode character as one of its members. This is in .NET so you'd think I'd want UTF-16, but then for Asian characters, there'd like be two characters required. What's the best practice when returnin...
In an ASP.NET Web Site project, I've always been able to make changes to the underlying C# code and simply refresh the page in the browser and my changes would be there instantly.
I can do the same thing when working with Java and Eclipse - edit my Java source and refresh the page and my changes are there.
I cannot do this in ASP.NET M...
When you drag a new Button onto a Windows Form it is automatically assigned the text "button1". If you have a control that inherits button called "CustomButton" then that one is automatically assigned the text "customButton1" when added to a form.
Is it possible to make this text default to something else? For example, can I have the te...
I have a C# program that is running as a CGI app in IIS on XP Pro SP3. It runs fine until I reference a library assembly class and use it in the program's code. If I run the CGI program by hand it loads and executes. But when it is run by IIS the referenced assembly fails to bind despite it being right in the same directory as the parent...