.net

One method shared by several classes

I have just one method that I need several different classes to access and it just seems lame to make a utility class for just one method. The classes that need to use this method are already inheriting an abstract class so I can't use inheritance. What would you guys do in this situation? ...

Stretching controls to fill ItemsControl

I am attempting to write a simple WPF learning project which creates a set of buttons inside a resizeable main window. There is to be one Button per entry in a collection, and the contents of that collection may vary during run-time. I want the buttons to fill the entire window (e.g. 1 button @ 100% width, 2 buttons @ 50% width, 3 butt...

How to determine if an IP address belongs to a country

How would i determine the country that a spcific IP address is originating from using c#. I need to use this to check if connections originate from a specific country. ...

What is the best Dotnet component suite?

What do you feel is the best .net Component suite? There are a lot but what is the best one and why? Thanks in advance. ...

Matching types using reflection in .NET

Hi, I am trying to use reflection to collect a property from a class that returns a certain type. However some of the properties I'm returning are strongly typed lists that house the type I want. Essentially I am trying to do the following: Public Function GetPropertyInfo(ByVal t as System.Type) for each pi as System.Reflection.Prop...

Extract Web Site name from url

How do you extract the Web Site name from a URL or a Link. I have found examples for other languages but not c#. Also the URL / Link will not be the current page that i am on. e.g. http://www.test.com/SomeOther/Test/Test.php?args=1 From that i need to extract just www.test.com , keep in mind that it wont always be .com and it can be an...

How to add graphics on top of a multiscaleimage?

I want to add graphics to a multiscaleimage. I use the project that Deep Zoom Composer auto generated when creating a multiscaleimage. Displaying the multiscaleimage from VS2008 works. I've tried this and added the graphics to the maincanvas, without any results: <Grid> <Canvas Name="maincanvas"/> <MultiScaleImage/> </Grid> Edit: W...

How to get my .net dll to be referenced in vba/com?

hi guys, i have a .net dll which is written in c sharp, which uses linq to read data and return it to another calling vba app. i didn't plan for this so the initial project was written for it to be accessible by another .net app. so now i just found out that there's a lot of stuff about .net com interoperability and what not. so i've le...

can a user be part of multiple subtree in a (Ldap based) Directory Service instance ?

Hi, I am pretty new to the ldap based directory service programming using .net framework; hence have a basic silly question. I would like to find out the all sub trees a particular user belongs to using System.DirectoryServices.Protocol. First of all , Can a User be part of the multiple Sub Trees in “a” directory service instance? If ...

Retrieve Password DNN

Hi ALL, we are using dot net nuke portal. when user clicks Retrieve Password he gets email with From: [email protected] I want to change this email but I can't find the place. Thanks ...

Why is the target disabled in dot net shortcuts after setup?

go to any dotnet application shortcut made by dotnet setup and click property, in the screen that's come up, why find target button is disabled?! this just happened to the shortcut produced by dotnet Setup, why? and how to enable it? ...

How to combine two expressions: result = exp1(exp2);

As subject, how to combine two expressions into a single one for this case: Expression<Func<IEnumerable<T>, IEnumerable<T>>> exp1; Expression<Func<IEnumerable<T>, IEnumerable<T>>> exp2; Expression<Func<IEnumerable<T>, IEnumerable<T>>> result = ???; // exp1(exp2) ...

WPF Gui refresh from different Thread

Hi, I have a popup Gui with command binding, <Grid x:Name="popup" Visibility="Hidden" DataContext="{Binding Path=PopupMsg}" > <TextBlock x:Name="tbMessage" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Margin="20,70,10,0" Text="{Binding Path=Message}" FontSize="16"/> ...

How to use a java package on a asp.net site

My Bank has givien me the option of using a COM component, Java (JAR) package or a plain C dll to interface with thier payment gateway. Given that I'd rather chew my arm off before installing their COM component on my server (Which I've spent the last 5 years eradicating of asp and com components) I'd like to host/convert the Java packa...

Data Caching in .NET

I've been looking at the spring.net approach to caching (using aop), since my project already has a dependency upon spring. However, I was surprised to find that you can only configure the caching rules declaratively as attributes. You dont seem to be able to configure the caching in a seperation configuration file.. Is anybody aware o...

Do .pdbs slow down a release application?

If a .pdb (program debug) file is included with a .dll then line numbers appear in the stack trace of any exception thrown. Does this affect the performance of the application? This question is not about release vs. debug, i.e. optimisations. It is about the performance implications of having .pdb files. Are the .pdb files read every ...

Any good .net packet sniffers around?

I am looking for one to use from my c# application. Anyone knows a free one? ...

Synchronize SQL Server over 'my own' comm. protocol

I am looking for a way to with little effort sync a master database (SQL Server) to several clients. A requirement in the project is to use a 'home made' communication protocol that already is in place for other software's. Basically the protocol can send/receive byte arrays to/from clients. I have been reading about Sync Services for ...

Asynchronous HttpWebRequest Issue with Timer

The situation: I was using HttpWebRequest.BeginGetResponse as documented in msdn. I had a timer sending the request every ten seconds. I received xml-structured information, when I tested it. The result: Being at the customers place and having that tool running I received incomplete (and therefore unparsable) xmls (each about 4KB). I c...

Use HttpListener for a production caliber web server?

Is it realistic to use the C# .Net class HttpListener as the foundation for a production caliber web server? The http web service I need to host contains no .aspx or static files. All http responses are dynamic and generated in c# code that is invoked via a few switch statements which inspect a restful url format. My thinking is that I...