We upgraded our application to .NET 4.0 a while ago, and now need to add the ability to backup SQL Server 2008 databases from the app. However, it doesn't seem that SMO is available for .NET 4. Is there a workaround or better way to perform a database backup (note that our backups need to be user initiated over a website, so we cannot ...
Is there something that is similar to XmlTextReader in terms of performance, but using JSON instead?
I have the choice between parsing data in XML or parsing the same data in JSON. I'd like to use JSON because I figure I could save a bit of bandwidth but I'd like to keep the performance of XmlTextReader. In other words, how do I stream...
Is it possible to check at runtime whether given type is Custom data type or one of primitive data types of .NET?
I have defined user defined types in assembly and those all types are some structs. I need to call the methods of user defined types of whome parameters are those structs. So this needs to fill the data accordingly before c...
Hello,
I need to make COM IntetrOp at runtime using reflections. My native COM Object's exposed methods have some parameters as pointers (DWORD*) and some double pointers (DWORD**) and some are user defined types(e.g SomeUDTType objSmeUDTType) and vice versa its pointer(i.e. SomeUDTType *pSomeUDTType).
Now for dynamic method invocation...
After upgrading from NServiceBus 2.0.0.1145 (.net 3.5) to version 2.0.0.1219 (.net 4.0), messages are no longer picked up from the queues when running on a windows 2008 server. Everything works as expected on my dev machine (win 7). Messages are successfully put on the queues, but then nothing happens.
Could this be a permissions issue...
Hi,
I try to get the string after the sign # in my url of my WebBrowser with:
MessageBox.Show(UI_WebBrowser.Source.Fragment);
But it return me a null string!
I also tried to navigate to a string like "http://www.google.com/#123" and nothing...
Need help please! :)
PS: my code:
private void checkIfUpdate()
{
UI_WebB...
At first I thought something like:
var aName=getAllSomethings();
Is very unreadable, and so I'll use dynamic typing just when there's no room for confusion such as:
AClassName aName = new AClassName();
Here,
var aName=new AClassName();
seems readable.
But than I read (here) that dynamic typing also comes with a price in performa...
I have a few classes to serialize, and deserialize, those classes implement an interface and thats all I really know at runtime about them.
The serialized xml is stored in a database and then, at some point I will need to deserialize this xml into a valid type.
I was thinking of using XmlSerializer , but the constructor requires that I...
I am developing an application that has the potential for massive parallel processing.
Currently, I am using a single PC with 8 cores, but I need to support distributed computing.
TPL Constructs such as PLINQ and Parallel.ForEach could be used to naturally distribute work load between different threads.
How could they be made to distrib...
Hi!
I have developed an application level add-in for Outlook targeting Outlook 2010 and .NET 4 and I want to run it on Outlook 2007, which should not be a problem due to the new "no pia" feature of .NET 4 (see this blog post).
However, after deploying the add-in with my Windows Installer package (the same package works for Outlook 2010...
I've just downloaded the dynamic object framework Clay and am running into issues regarding castle project versions. Clay uses functionality from v2.0 of "castle" whilst I have a project which has been started referencing v2.5. Needless to say just to make matters more interesting I'm a complete beginner in all things "Castle" and IoC.
...
Hi all,
My question title sounds a little bit difficult - sorry. I'm new in MEF :-).
My scenario:
public class MainClass
{
[ImportMany(typeof(ITest))]
private List<ITest> Tests { get; set; }
public MainClass()
{
Init();
}
private void Init()
{
DirectoryCatalog catalog = new DirectoryCatalog(@"./");
Compos...
Hi,
We have built an ASP.NET application in 4.0 (we can change it to 3.5 if necessary) with a SQL Server database.
I am looking to create an installation package (exe or msi) so that I can provide this file to my clients and they can install it on all of their laptops. This asp.net application will be running on laptops that don't hav...
I have a form where one of the fields would allow entry of HTML tags.
<asp:TextBox ID="someID" runat="server" TextMode="MultiLine" />
In this field I have a RequiredFieldValidator validation only. Unfortunately, after any PostBack if the content of any of the fields includes HTML tags or any other potentially dangerous code - the enti...
Suppose you have an interface like this:
public interface IDoSomething<out T>
{
T DoSomething(object value);
}
To be able to call DoSomething on that interface without knowing the type of T, you have to create this:
public interface IDoSomething
{
object DoSomething(object value);
}
Modify your original interface to inherit...
Is there a .NET 4.0 version of the mdbg managed debugger source ?
I need to port my CPU analyzer, and ICorDebug has changed a bit in .NET 4.0.
...
I needed a double[] split into groups of x elements by stride y returning a List. Pretty basic...a loop and/or some linq and your all set. However, I have not been spending much time on extension methods and this looked like a good candidate for some practice. The naive version returns what I am looking for in my current application....
...
RolePrincipal is no longer sealed in ASP.NET 4, but whenever I try to cast the HttpContext.User in the OnPostAuthenticateRequest to my custom principal I'm getting the same can not cast error from asp.net 3.5 and below because it's being reset back to RolePrincipal
What am I missing?
...
I have found similar questions on this page, but I can't seem to figure out how to interpret the answers or figure out if they are truly duplicates.
Here are the possible duplicates I've found, with comments:
SetWindowsHookEx returns 0 when compiling for the .NET 4.0 framework in 32bit machines
It doesn't seem to return 0 on mine, bu...
Hi,
I have an app with a self-hosted WCF service.
My WCF service gets published under the URI "net.tcp://localhost:8004/DocumentService". When I run the service on a remote machine and try to discover the service with the new .NET 4 class DiscoveryClient, the found services all have the URI "net.tcp://localhost:8004/DocumentService" t...