.net

How do you manage multiple versions of the same software for each customer ?

Hello, I have a source code 95% the same for all customers. Some customers ask something specific. How can I manage this, if it possible with VisualSVN/Subversion ? Could you tell me how manage this kind request ? Thanks, Update1: Some precision about the applicatio , it's a web ASP.NET MVC with NHibernate. The appliucation has severa...

What components make up enterprise .NET development

I'm looking at applying for a new job as an Enterprise .NET programmer. It says I need to have Enterprise programming experience. I have a lot of .NET experience, but I moved to a different role a few years ago which is very much Enterprise, just not .NET enterprise. What .NET components should I be familiar with? Remoting, LINQ, WCF, ...

When i run aspnet_regsql, nothing is created in the db?

Hi, When i run the aspnet_regsql.exe tool to add membership, roles etc against my db nothing is created at all. I run the tool via the GUI, enter my server name, and SQL server Authentication details, enter the db name('Tasking_Test') and follow the steps in the wizrd. After it's finished, i fired up SSMMS 2005 and checked that it had...

SOAP Web Service on ASP server consumed via PHP

I'm trying to use a Web Service using PHP and SOAP. The Web Service is built in .NET and hosted on an ASP server. I'm using the following code to interact with the API but I keep getting an error with parsing WSDL. The PHP UNIX server has an SSL certificate, the web service host also has an SSL certificate and I'm using https to initia...

Expression<TDelegate>.Compile in Medium Trust environment

When trying to compile an Expression in a medium trust web app I'm getting a MethodAccessException. Does anyone know of another way to compile an expression under medium trust or a workaround to avoid this exception? The code that throws the exception: Expression<Func<object>> efn = Expression.Lambda<Func<object>>(Expression.Conver...

Format exception messages using InvariantCulture or CurrentCulture?

When throwing exceptions, I often pass in a formatted string that exposes details about the problem that has occurred. I always specify a formatting provider if possible (which is good practice because otherwise you may forget to decide which culture is appropriate and as the default is the current culture, that can lead to many bugs). ...

Wait for network configuration to be complete in Windows Service startup

Dear all, current project of my team involves Windows Services communicating heavily among several machines via WCF. We occasionally run into problems upon startup, where we suspect that Services are initialized before the machine's IP connection is fully configured. Anyone have an idea or suggestion how to verify this or how to genera...

Fluent configuration problem

I'm trying to get fluent configuration working without success. I get the following error: Activation error occured while trying to get instance of type LogWriter, key "" when I try to access the logwriter: Dim logwriter As LogWriter = EnterpriseLibraryContainer.Current.GetInstance(Of LogWriter)() Configuration: Dim formatBuild...

Prevent Anti-Virus to block outgoing email with C#

I have an application with a static class that is capturing all errors that happens during the runtime (if its the case) and when process is done, it sends out an email with the list of errors so I or any other developers can address those errors. However my problem is that McAfee is blocking the request, as if it was a kind of virus. ...

Ints and Doubles doing division

Short version: Why don't I have to coerce 60, and int, into a double, so that I can use division with another double if I DO care about the fractional part? Long version: my boss called me out on a line of code. I tested it and it is working perfectly fine, but he thinks I have a bug waiting to happen. int durationinseconds = 61; // ...

Confusion about INotifyPropertyChanged and updating Bindings

From what I (thought to) understand is that implementing INotifyPropertyChanged within the ModelView, allows to raise the PropertyChanged event in case a property has been modified. That way the View should get to be notified that the underlying property has changed and hence the UI should fetch the new changes. Did I get the theory ri...

Silverlight RichTextBox: How to set custom font from resource/stream?

Hi everybody, Does anybody know how to set the font within a RichTextBox from a Stream? TextBlock and TextBox do have the option to set the FontSource, but classes like Run, Paragraph and the whole RichTextBox miss that. :( Any reason for that? Is there any known way to achieve that? I already tried to set the whole source URI withi...

Why does this object always come back from the clipboard as null

I am working with the clipboard in .net with the following code List<object> templateList = new List<object>(); Clipboard.Clear(); Clipboard.SetDataObject(templateList); IDataObject dataObject = Clipboard.GetDataObject(); var x = (List<object>)dataObject.GetData(typeof(List<object>)); For the above code x is an empty List...

nHibernate object mappings create key violations

Hi, Got a bit of an odd situation which I'm trying to map in Fluent nHibernate and failing. I have an Asset object which contains both an Image object and a File object. The Id of Image and File is identical, and the Image object contains a File object. This situation arises because an Image is always also a File (which is why the Id's ...

.NET : Set Active Directory security via Web.config only

Our application requires Active Directory for users to access it. Our goal is to split the business logic and the security. Here is what I try to do but did not succeed yet : 1) Connect to Active Directory via web.config. 2) Specify groups needed for each .aspx page in the web.config file. (e.g.: index.aspx = admin, users) 3) Redire...

What database for both local and client/server?

We have a "large" code base already developed using SQLite and NHibernate using .NET 2 for our clients. Using SQLite we can communicate with the db (even multiple clients) across a Windows file share. Most of the time, this is perfectly sufficient for what we need to do. Over the last few months, we have needed to integrate our applic...

List of users in specific Active Directory Distribution Group

I'm trying to get a list of users and some properties about the user from within an active directory group. Update: Here are the two methods I currently have: Dim adGroup As New DirectoryEntry("LDAP://CN=MyGroup,OU=Groups,OU=Accounts,OU=All,DC=domain,DC=com") Dim adMembers As Object Dim objUser As ActiveDirectoryUser D...

How to modify a List<T> of structures in .NET?

Why I am not able to modify List items? struct Foo { public string Name; } Foo foo = new Foo(); foo.Name = "fooNameOne"; List<Foo> foos = new List<Foo>(); foos.Add(foo); // Cannot modify the return value of // 'List<Foo>.this[int]' because it is not a variable //foos[0].Name = "fooNameTwo"; Foo tempFoo = foos[0]; tempFoo.Na...

Using systemdiagnostics.process to run background jobs in Powershell

I know Powershell has background job functionality with Start-Job, Wait-Job, etc., but is it possible to use the Process class from System.Diagnostics in .Net to achieve the same thing? If so, what would be the best way to do it/what advantages would it have over the default Powershell mechanism of running background jobs? ...

Mono-Cecil: How can I get a ModuleDefinition for mscorlib?

I'm trying to write IL that calls methods in mscorlib, but I can't figure out how to get a ModuleDefinition to mscorlib to actually reference the types & methods, and documentation & google are lacking. ...