.net

Application disappears after starting - C++ linking managed code dll

Hello, we have a problem with our applications. We have recently upgraded our toolchain to Visual Studio 2010 and friends, it all works fine on Windows Vista + Windows 7 developer machines and Windows 7 customer machines. (all x86) Today we did a first installation to a client PC running Windows XP SP2 x86, and all applications linking ...

How can i solve NullReferenceException was unhandled in text writelne event?

if i try to add below data to any text file Error occyred: "NullReferenceException was unhandled." Error occurs in Tex.Writeline(li) . . . . Detail: Object reference not set to an instance of an object. public void WriteScript(List myTextList) { FileInfo f = new FileInfo(@"C:\temp\Scripts.txt"); Stream...

Possible to call a managed DLL from unmanaged C++?

Is it possible to call CLR DLL (one for example which is made with C#) from Undamaged C++ code? I need a DLL that is not managed to call into it somehow, maybe even via some proxy C++ process that is built with C++ / CLI? ...

Why isn't my File.Move() working?

I'm not sure what exactly i'm doing wrong here...but i noticed that my File.Move() isn't renaming any files. Also, does anybody know how in my 2nd loop, i'd be able to populate my .txt file with a list of the path AND sanitized file name? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System....

How to create inmemory HTML/XML document in .NET ?

I would like to write application which will iterate trough certain test cases and generated output in HTML file. For this i would like to have something using which i can keep appending the HTML nodes to the output for each test case. Is there nice way in .NET for doing so ? How ? Any pointers or suggestions will be helpful. ...

Admin required for Visual Studio 2008 Setup Project

I have a VS 2008 Setup Project that is installing a very simple application in the local user's App Folder. When the Setup Project runs, it is requiring the Admin to login to run it. How can I allow a Standard User to run the installation. There are no Prerequisites. The MSI file is the only file to be run (no Setup.exe). I have sig...

outlook calendar connectivity with java web service

We currently have a java/jsp online web service that includes it's own custom calendar. I am trying to do some research into the possibility of connecting it to a users outlook. Our basic needs that are most simple is some way to sent the person a meeting request that can be added to their outlook from our service. I know the ideal sol...

Efficient database access when dealing with multiple abstracted repositories

I want to know how most people are dealing with the repository pattern when it involves hitting the same database multiple times (sometimes transactionally) and trying to do so efficiently while maintaining database agnosticism and using multiple repositories together. Let's say we have repositories for three different entities; Widget,...

ClickOnce multiple deployment location options

I have an internal app that is deployed through ClickOnce. We have 5 branches and our vpn lines between us are quite slow. I would like to explore the possibility of publishing my app to each of the 5 branch servers. My understanding of ClickOnce is that my simplest approach will be to manually change my Publishing and Installation Fo...

.NET Windows Service - Pulling Updates with Service Restart

Hi All, None of the following has been attempted - I have no idea if it's possible, or, for that matter, where to start. I'm presenting a hypothetical scenario for a project I'd like to attempt. Situation: I provide a windows service to a remote client (customer), where they install the service on their server. Issue: Somewhere ...

Help creating a Windows Form for an Entity who has a reference to a different Entity.

Here is the scenario (ADO.NET Entity Framework and C#). Contact*: String name; Address addr; Address*: String street; String city; *this is not the real code, but you get the picture I am trying to create a Windows Form that appears flat to the user. In other words, the Form will have four fields (name,addr,street,city), and whe...

live broadcasting video?

Hello everyone, I am using VSTS 2008 + .Net 3.5 + C# + Silverlight 3.0 + Microsoft Expression 3 + ASP.Net + IIS 7.0. I want to show my desktop lively to other users. In more details, suppose a case when a teacher is showing Demo or ppt on her/his desktop, the information on desktop could be broadcasted lively so that other users could s...

ASPNETCOMPILER error ASPCONFIG: Could not load file or assembly 'Microsoft.VisualBasic.Activities.Compiler' or one of its dependencies.

I just upgraded my project to Asp.Net 4, from 3.5. When the build kicks off from TeamCity, I get the following error: [Project "Website.metaproj" (Rebuild target(s)):] C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /Website -p Website\ -u -f PrecompiledWeb\Website\ [12:11:50]: [Project "Website.metaproj" (Rebuild ...

.NET 4 GC known thresholds to trigger collection?

I know that the logic for GC to trigger is not simple but it has certain thresholds to monitor. Anyone knows what are these thresholds could be for .NET 4 workstation and server GC ? Thank you ...

Expression Encoder 3 SDK screen capture C# sample?

Hello everyone, I am using VSTS 2008 + .Net 3.5 + C# + Microsoft Expression 3 SDK. I want to capture screen and output a wmv file. I tried hard but can not found C# samples from Google. Any reference samples? thanks in advance, George ...

Inheritance security rules violated while overriding member - SecurityRuleSet.Level2

I have a class that inherits from Exception. In .NET 4, I started receiving a runtime error: Inheritance security rules violated while overriding member: MyBusinessException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding meth...

MS Word DDE: What does destroy my encoding?

I'm facing a problem with a MS Word DDE Automation controlled by our CRM system. The setup Base for the document created is a Word .dot template which fires a macro on Document.New. Inside this macro I create a .Net component registered for COM. Set myCOMObject = CreateObject("MyCOMObject") The component pulls some data from a datab...

Where does VS 2010 Tools' gacutil.exe install assemblies?

I used the Visual Studio 2010 Command Prompt's gacutil.exe to install an assembly. I expected the assembly to be added to C:\WINDOWS\assemblies, but it was instead added to C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL and is not showing up in C:\WINDOWS\assemblies. Is this a problem and should I be concerned that it's not showing up ther...

How to tell whether a class/method is accessible using reflection?

I use a Dynamic Assembly to create derived classes at run time. How can I tell, using reflection, whether the base class and individual methods in the base class can be used/called from within the derived class in the dynamic assembly? ...

Thread.CurrentCulture refers to client or server

Hi, simple question: Where does Thread.CurrentCulture gets it's data from? Client (browser) or server. And another question, is this the right way to find out the culture of the user? Thanks ...