.net

How can I inject a property only if the value is non-null at runtime using Unity?

Hi there, I have an interface to resolve and one of the mapped object's dependencies has a property on it which I would like to set with a value that I only have available when I resolve the top level object. There's no valid default value for the property. If its not set it should be null and it should only be set if the value that I ...

Cant get rid of "Configuration system failed to initialize" exception in Vb.net

Due to some bug I had deleted the whole bin folder *with* config files, yesterday but after doing so it was working fine but today the program always throws this exception: Configuration system failed to initialize. Even when I have recreated the configuration files. The exception is thrown as soon as application starts. ...

How to convey the importance/role of application architecture to business heads & junior developers.

Hi there, This question is subjective and can reasonably only be answered by those seasoned developers with leadership experience and management personnel with a sound technical proficiency. For the past year I've pursued educating myself extensively in OOD to become a stronger programmer. In particular, reading and applying knowledge ...

Why do HTTPWebRequests and the WebBrowser control seem to perform more slowly for me when run from an EXE invoked by a windows service?

So I'm running a Windows Service as a user. Admin rights. This service launches an EXE via Process.Start. Within the EXE, a WebBrowser control is used to navigate to a website, log in, handle all the security handshaking, and get some data. It comes back out, writes the data to a file. Not the most efficient process, admittedly, but...

How to populate an ASP.NET web page from a desktop application.

Hi All, I am a Windows Application Developer with very basic web development experience. We are developing a Windows desktop application in .net that monitors and controls some processes over the network. I am thinking of giving a web interface to this application - meaning user can access some part of data from a web browser. (e.g. Sho...

Unit testing with Vs2008, is there an attribute or something where I can ignore Assert

Not ignore it completely, just have it not stop execution if it hits an Assert and it fails. I would like to see a summary of all the fails at the end. ...

Connecting to Microsoft Analysis Services cube with double hop windows authentication

Hi I'm trying to enforce windows authentication for users of a .Net application on Web Server to access a cube on a Microsoft Analysis Services database on SSAS and just going nuts trying to get it to work! I am using <identity impersonate="true" /> in the web.config. Anonymous access is turned off in IIS and Integrated Windows Authen...

Can you programatically define ASP.NET configuration?

Is it possible to define a large portion, if not the entire, web.config of an ASP.NET application in code? If so, how? Would you use an IHttpModule? In the same vein, can you resolve an IHttpHandler within said module to handle all incoming requests? Edit 1: The last bit was instigated by this answer to another question. Edit 2: What I...

Can partial classes be used for web-services ?

Can partial classes be used for web-services or there is some other way to implement it ? ...

Calling .net Webservice from Java using WSDL

Hi I am trying to call webservice in .net using it's wsdl from Java. I am trying to create Client stub using Apache Axis 2 in eclipse Galileo SR2. Same exception with Netbean 6.9. I have "AddOrgService" method overloaded in webservice. Looks like it is creating a problem. What could be the solution? But I am getting following excepti...

How to store TimeZoneInfo objects in a database?

Somewhat misleading title, I know. Never actually wanted to store TimeZoneInfo object themselves: rather, I want to store some culture-neutral identifier, which can then be later used to reconstruct an instance of TimeZoneInfo. Currently, I'm storing the value of TimeZoneInfo.Id property and it seems to be OK both on English and Russian...

How to use Datetime Picker

Using ASP.Net & C# I want to use a datetimepicker in my web page, i cannot find the control, How to get a datetime picker control in the web page. Can any provide a sample code. Need C# code Help. ...

Calling .Net unmanaged code from Delphi code

Delphi contains many types in its decelerations Type Record Type Instance Type Class They ether contain a layout of a structure, or a group of methods or a Class that contains both. DotNet contains many of these objects as unmanaged code just as you declare Delphi decelerations but they are accessed through DLL’s. 1/ The q...

RPC_E_DISCONNECTED error message ? (Solved)

I'm saving the current document with save as, after that I want to close document with document.close method, close control and finally quit application with Application.Quit method. However after execution of Application.Quit it throws an exception called RPC_E_DISCONNECTED, what does it mean how to solve ? thanks objWinWordControl.doc...

No-touch deployment and information about update

Greetings, We have an application written in .net 3.5 that uses wcf and also wpf for the purpose of presentation. We have No-touch deployment implemented so users just click on internet shortcut and application starts immediately. Sometimes, when we update application, it takes about 30minutes to update client applications, server and ...

Question about boxing and unboxing.

I got the following code: object var3 = 3; Console.WriteLine(var3.GetType().ToString()); Console.WriteLine(typeof(object).ToString()); The output is: System.Int32 System.Object Why aren't they both System.Object? Thanks in advance. ...

What is the best way to cache XML feeds locally?

I have a XML feed which contains 1000+ records of properties (rent, sale). Currently I am calling this feed 16x on homepage, always returning only 3 properties for specific criteria like 3 new house, 3 new flats, etc, 5 recommended house, 5 recommended flats etc. This scenario was working well for 7 months whilst there was 200+ proper...

Does threadpool get shared between application domains?

Consider a process which is creating multiple application domains. Do these Application domains share same thread pool? If yes, how is it coordinated between multiple application domains? ...

Can we retrieve the method body from .dll file?

Hi everyone! I have the requirement to retrieve the method body from a .dll file in C#. I'm using System.Reflection to retrieve the method names, parameters and properties etc. but didn't find a way the to retrieve the method body. Please suggest me some an idea... :-) ...

C# Convert string to int (with rounding)

What's the easiest way to get a string with the value of "76.10" into an int rounded to 76? I've tried a few different ways using Convert.ToInt32 and Decimal but I can't seem to get it right? Edit: Here's the code Jon helped me with: decimal t = Math.Round(decimal.Parse(info.HDDStatus)); int v = (int)t; ...