.net

Upgrade from .NET 3.0 to 3.5: Sites set to StateServer revert to InProc when in Web Garden

Scenario: Take a server running .NET 3.0 and an ASP.NET Web site running in an application pool that has Web gardens enabled (number of processes: 3). The web.config configuration is as follows: <sessionState cookieless="UseCookies" cookieName=".authz" mode="StateServer" regenerateExpiredSessionId="true" ...

What are the current trends in .NET?

My head is starting to spin from all the new stuff that Microsoft puts out, and so I'm trying to get a handle on what the current trends are that development teams are using; there's a very good chance I'll need to brush up on my .NET skills, and I want to make sure that I'm choosing the right things to (re)learn to maximize my employmen...

.NET Best approach to implementing client/server queuing model with external app?

Here is the spec: Multiple clients using a WPF winforms application on their local machines Clients initiate requests to the server to execute a simulation. This initiation should probably be via a web service but other suggestions are welcome Requests are queued on the server Server sends out sequential requests to the simulation mo...

Capturing a memory dump - .NET

Looking for suggestions for a method of capturing a memory dump while a user is running under terminal services. I have tried using "AdPlus" with WinDbg but the application runs under terminal services and it doesn't seem to like that combination. (This is a VB.NET application.) Similar to the following question but needs to allow the...

Is it possible to read request headers from WCF IDataContractSurrogate implementation?

I have a RESTful service that I am developing in WCF. I am exposing a contract that does not have serializable types so I am using a DataContractSurrogate (implementation of IDataContractSurrogate) to create surrogates that can be serialized with the DataContractSerializer. My question is, how can I access request/response headers in m...

F# naming convention

Hi, Is there an "official" naming / casing convention for F#? I'm always in doubt of using C# style or not: Class.MyFunctionName or Module.my_function_name In F# you're meant to mix BCL classes and F# library ones: they have different casing and the code looks very ugly. Thanks ...

ASP.NET web application architecture design advice

Hello everyone, previously my ASP.NET web application connects to a database directly using ADO.NET. Now I want to change it to 3 layers, ASP.NET layer, middle web service layer and backend database layer. I think there is benefit that I could abstract data source to ASP.NET front layer, loosely coupled and reduce potential security ris...

How to use NHibernate in distributed architecture?

I start build a system with distributed architecture by all applications will communication by REST service to expose some data(DTO) or invoke some updates. I would like to know how to use NHibernate to help with manage domain object because they are in different applications. How NHibernate identify which objects are new for inserting a...

Installing a SQL Compact-based .NET app

Is there a way to have an application access a SQL Compact database file without having to install the SQL Compact installer as well? I don't want to have a separate installer run when the user installs my program. Can I get by with just some well placed DLL's in my application's folder? ...

Passing data in ASP.NET MVC using LINQ - nuttiness

Allow me to start with: I am a n00b on ASP.NET MVC. I love it, but I am a n00b. I am trying to pass "complex" data back from a LINQ query. I understand how to use the data context and then just cast that data when I send it back, but when I do a more complicated LINQ query which returns an anonymous type, things break down. I saw som...

Impossible (how I hate to use this word) cross threading error?

Can anybody please explain how this could possibly happen? I am completely aware of programming with thread safety in mind and as you can see I am catering for UI updates via a form InvokeRequired check here, everything has been working fine and no changes to break this that I am aware, and now suddenly just as I'm programming other par...

.NET 3.5 SP1 as a requirement (or should I try for 3.5 w/o SP1)?

We're creating a WPF custom control targeted at .NET 3.5. It is very compelling to use StringFormat property in bindings, but this was only added in SP1. So the question is: how many potential users will we be cutting off by changing the requirement from .NET 3.5 to .NET 3.5 SP1? Or is it safe to assume that more or less every user who...

Cast object to decimal? (nullable decimal)

If have this in the setter of a property: decimal? temp = value as decimal?; value = "90" But after the cast, temp is null... What is the proper way to do this cast? ...

Generate datetime (exp: 09.02.2009) to string date (exp:Monday)

hello my master! i try to learn or generate any codes to learn string day("26.02.2009") ---> give me "wednesday" i need static datefunction in C# . Forexample: datetime Str_day= Returnstringdate("09.02.2009"); ---->Str_day="Monday"; Returnstringdate("09.02.2009") { it must return Monday!!! } OR Returnstringdate("09.02.2009...

How can I create a PFX file from a Java Keystore?

I have a Java keystore (.jks file) holding a single certificate. How can I create a .pfx file from this keystore? ...

WebService and Configuration

I created a WebService using the .NET 2.0 framework, a class based on an interface that has the WebServiceAttribute and hosting it using IIS and a ASMX file. The WebService currently loads its configuration from one XML file. I'd like to create multiple instance of this service where each loads it own configuration. By coping the ASMX ...

Setting XslCompiledTransform Outputsettings

Hi, I am writing bit of code that relies on XslTransformation of one submodule. Since the XslTransformation exposes a XmlWriterSettings field called Outputsettings I thought it would be cool to expose the XmlWriterSettings field in my class too so I can use my IoC container to configure the XmlWriterSettings through the configuration....

Identifying the client during a .NET remoting invocation

Hi, Given this MarshalByRef class: public class MyRemotedClass : MarshalByRef { public void DoThis() { ... } public void DoThat() { ... } } Client side code: MyRemotedClass m = GetSomehowMyRemotedClass(); m.DoThis(); m.DoThat(); I can have several clients doing the same thing at a the same time. I would like ...

Anonymous types VS Local variables, When should one be used?

I am not sure when I should use anonymous types instead of local variables in C#. I have: string fullMessage // This is the full message including sender and recipient names string sender = GetMessagePart(fullMessage, "from"); string recipient = GetMessagePart(fullMessage, "to"); //do some stuff and deliver the message Should I us...

Is .NET already the right way to go for small app development?

I am developing a small windows app, but have some trouble deciding whether to use .NET or not. As a coder I would like to make use of the .NET libraries. On the other hand, requiring my users to download the gargantuan .NET runtime seems like a horrible decision. A 100 meg prerequisite might be alright for software in the scale of Visu...