I am trying to write an IHttpHandler that can work with a request for streaming media coming from Windows Media Player/Silverlight. That means responding to a raw HTTP request like this (taken from the protocol document)
"GET /ms/contoso_100_files/0MM0.wmv HTTP/1.0"
"Accept: */*"
"User-Agent: NSPlayer/4.1.0.3925"
"Host: netshow.micro.c...
Is there a way in the Facebook Connect API for .Net to check if a session is expired or if it is still valid? Some times I can receive the userId but if I try to get any other info, it tells me that the session is expired, which is why I would like to check if the session is expired before trying to receive the uid (since I won't be able...
hi,
i am using Microsoft.Reporting.WebForms.LocalReport to generate some PDF, everything works like a charm, but now evil marketing wants to use a custom font (they are using such crazy arguments as "corporate identity" and stuff).
i already goggled around and now i know that
i need ReportViewer 2008 SP1 or greater
the font has to b...
How would one use .net reflection to determine the type of the executing assembly, by type I mean dll or exe. Currently its possible to do something like:
Assembly.GetExecutingAssembly().CodeBase.ToLower.EndsWith(".exe")
But it seems like something better could exist that does not need to do a string comparison, i.e. comparing the asse...
I've got a ListView that displays different kinds of items. One of those has a textbox I want to set the focus to. I use a DataTemplateSelector to select the DataTemplate for each item.
This question explains how to set the focus on a textbox in a DataTemplate. But, in this case the DataTemplate is definded directly on the ListView. In...
I'm using a ServiceController to Start services on a remote machine. When I want to query the services on that machine, I get the following exception:
Cannot open Service Control Manager on computer 'machinename'. This operation might require other privileges.
What privileges are required to query/start/stop the services on a remote ma...
I have a combobox control hosted in a unbound DataGridView control. When the user selects an item (or types an entry and hits enter) I want it to apply the change and come out of edit mode.
Is this possible?
...
I need to decide whether file name fits to file mask. The file mask could contain * or ? characters. Is there any simple solution for this?
bool bFits = Fits("myfile.txt", "my*.txt");
private bool Fits(string sFileName, string sFileMask)
{
??? anything simple here ???
}
...
POCO = Plain Old CLR (or better: Class) Object
DTO = Data Transfer Object
In this post there is a difference, but frankly most of the blogs I read describe POCO in the way DTO is defined: DTOs are simple data containers used for moving data between the layers of an application.
Are POCO and DTO the same thing?
(ps: look at this great...
I have a custom control which is part of a list. The text that it should display is set by assigning a value to its Text property. At runtime, this text is loaded from a database. I want to prepend this text with the string "Toelichting: " (Dutch for "Explanation"). I can accomplish this by setting the FormatString property of the contro...
Hi all,
Dot net allow you to develop an application in multiple languages i.e c# vb.net,j# etc. Suppose I develop an application in two languages vb.net and c#. If I declare one session variable in vb.net code and i want to access the same session variable in c# code. Is it possible?
...
I am having a problem with the UpdatePanelAnimationExtender and multiple update panels. What I want to happen is for the panel to fade out, update, and then fade back in.
However, it fades out all the panels and only fades the one I updated back in. Apparently this is a rather common problem with UpdatePanelAnimationExtender, but I ...
I have to insert some data periodically in my SQL Server database. But the feeds where I read the data repeats some data that was inserted before. When I use Linq-to-SQL to insert into the DB either some data is duplicated, or a primary key violation exception is raised, depending on the primary key.
How to insert the data without dupli...
I've got an exception log from one of production code releases.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Text.RegularExpressions.Match..ctor(Regex regex, Int32 capcount, String text, Int32 begpos, Int32 len, Int32 startpos)
at System.Text.RegularExpressions.RegexRunner.Init...
I'm trying to store an empty Access database (.mdb) as a resource in my application. I then want to write it out the file system and populate it with table definitions, etc. The problem I'm having in Visual Studio 2005 and my C# application is with not being able to access the resource stored in the same assembly (which I would have th...
Would someone recommend an example of a good API (.NET) overview documentation. I don't mean, chm file with all the method/classes, but actual overview with diagrams, explanation, tutorial, etc., preferably commercial...
Thanks
...
I know that C# (and .NET in general) is big on attributes. However, despite the fact I have programmed in C# for many years, I haven't found myself ever using them. Would someone get me started on them, and explain where is the best to use them?
Thanks
...
Hi all.
I'm working on a project that depends on third party controls.
While opening website after installation, I've an error message regarding these controls,
Could not load file or assembly. assembly_file_name.
The system cannot find the file specified.
web.config file, has an assembly tag for each dll.
When I remove these t...
Hi, I'm having some problems with DllImport and ASP.NET because when I use a imported method ASP.NET loads the Dll and locks the file even after it finished using it.
Is there any way to force ASP.NET to release the lock on the file?
...
Hi all.
I've always use String.IsNullOrEmpty to check for a empty string. It recently come to my attention that a " " count as not a empty string. For example,
Dim test As String = " "
If String.IsNullOrEmpty(test) Then
MessageBox.Show("Empty String")
Else
MessageBox.Show("Not Emtpy String")
End If
It wi...