.net

Sharing through Network ( INTRANET ) using .NET application

I am developing a winforms application using .NET 2.0 and Sql Server 2005. I want to just retieve the values from another PC from the Computer in which SqlServer Database is present. The appsettings that I have done in App.Config is as follows: <configuration> <appSettings> <add key="DatabasePath" value="Data Source=192....

How do I convert a int to an array of byte's and then back?

I need to send an integer through a NetworkStream. The problem is that I only can send bytes. Thats why I need to split the integer in four byte's and send those and at the other end convert it back to a int. For now I need this only in C#. But for the final project I will need to convert the four bytes to an int in Lua. [EDIT] How abo...

How to get the list of folders and files deployed on Linux WebDav?

Hi, I have deployed the WebDav server on Debian Linux and give appropriate permission. While I am trying to access the list (SEARCH) of folders throgh following code I am getting the following error: The remote server returned an error: (405) Method Not Allowed. The Code Used is: try{ strQuery = "<?xml version=\"1.0\"?><D:search...

Usage / handling of non relational datasources in .NET applications

Which .NET (data / middel-tier) technologies / framworks can / should be be used, if the datasource isn't a classical relational database, but a service or a remote function call or whatever ? Are technologies like WCF RIA services or WCF DATA services (OData) suitable for handling non relational datasources. ...

Sorting an array of folder names like Windows Explorer (Numerically and Alphabetically) - VB.NET

I'm killing myself and dehydrating trying to get this array to sort. I have an array containing directories generated by; Dim Folders() As String = Directory.GetDirectories(RootPath) I need them to be sorted so they appear like in windows explorer in win7 / vista. -- numerically and alphabetically by folder names. The folder names co...

How can I tell when my `IDisposable` types have not explicitly been disposed?

It's hard to find at design/compile time types that are IDisposable but that are not disposed correctly. What methods are there at runtime to find them? ...

click once Error: The deployment identity does not match the subscription

Hi all, I'm using Visual Studio 2008 sp1. I have an application WinForms deployed internally using ClickONce in shared folder in local network. The Test Certificate pfx expired in 2035. I h ave published the update to the internal shared folder severals times. Note that the project is only set to 'Sign the ClickOnce manifests' an...

Who are the architects/designers working on WPF?

I know Kernighan & Ritchie were the inventors of C and so I bought their book, I know Don Box was "the man" behind COM and so I bought his book "Essential COM". Now I want to learn WPF, who are the architects/designers of WPF? Charles Petzold? Chris Anderson? ...

Why do I get this System.NullReferenceException?

I'm getting a weird error. I have the following front-end code: <%@ Page Title="" Language="C#" MasterPageFile="~/nokernok/MasterPages/nokernok.Master" AutoEventWireup="true" CodeBehind="articleList.aspx.cs" Inherits="development.nokernok.articleList" %> <%@ Register TagPrefix="EPiServer" Namespace="EPiServer.WebControls" Assembly="EPiS...

C# URI issue with ftp server

I am having trouble to access a FTP server via C# because of not finding the right URI. The ftp server can be found using ftp.xxx.com - thus ftp ftp.xxx.com works from the command line, ftp ftp://ftp.xxx.com yields unknown host via the command line. The same happens then when using FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.C...

What is concrete implementation?

Hello I saw lot of posts in StackOverflow and elsewhere talking about concrete implementation. While fiddling with WCF i came through the line Tying your service implementation, or any “service based” class to a concrete implementation is never a good idea. Can anyone explain what Concrete Implementation is? Regards NLV ...

IDeserializationCallback in XMLSrializer...

Is there a way to utilize the IDeserializationCallback interface with the standard xmlSerializer? It does not appear to be supported in this context. IDeserializationCallback works fine when used with the binary formatters. Basicaly i want to do some calculation when de-serialization e.g.: public void IDeserializationCallback.OnDeser...

Change line terminator

How can I force StringReader.ReadLine() (or alternative stream) to use \n instead of \r\n? ...

Deploy .NET web service in a concrete port

I would like to deploy or publish my .NET based web service always at the same port. Can I do this directly in my code (programmatically talking)? Thanks. ...

Are there any benefits of using SqlDbType.VarChar instead of SqlDbType.NVarChar if all columns in the database are varchars

All columns that contain text in the database used to be nvarchar but we converted them to varchar for performance reasons. I am now left with all my SqlParameters still using SqlDbType.NVarChar and I want to change them to SqlDbType.VarChar but I don't want to waste time doing it if I won't see any benefits from changing them. Is it wor...

how to resize an image with unknown size to a specific size without too much of deformation?

hi , I want to get an image from a user and re-size it to a specific size but the problem is : I don't know about the user's image size and I have to re-size it to a certain size but deformation is burden over here. how can I solve this problem? is there any algorithm according to that? or is there any source code preferably in .net? be...

Forms Authentication & IIS7 (&MVC): Why ReturnUrl=/ is added?

When trying to access my site: www.X.com The browser changes the url to: www.X.com/ The problem is that the result url is: www.X.com/HomePage.aspx?ReturnUrl=/ (HomePage.aspx is the default page) On IE: www.X.com/HomePage.aspx?ReturnUrl=%2f For some reason the Forms Authentication treats / as a page that the user is trying to acc...

GraphSharp .Net Graph Layout Engine

I want to use the apparently fantastic GraphSharp library but the project has NO documentation. Specifically I'm interested in using the layout engine and not interested in the WPF control. I simply want to calculate a layout (positions of the nodes) for a given graph and layout algorithm. Does anyone have any advice, tips, links on h...

How can one restart/reset SQL connection pool in .Net?

I am having a near critical issue with my app using SqlClient against a MS SQL server. The problem is that the SQL server is clustered in a Failover Cluster. If one of the nodes fails or the other node is made active, it seems like the connectionpool is still connected to the old server. The result is that I get exceptions as that nod...

Thread in Code behind

Hi, I have a aspx.cs page and a corresponding aspx page for it. When this page is loaded, and on a button event, I have created a thread which runs for sometime and then exits. I would like to know who is the parent of this thread. Lets say the thread is running and I close this page, will this thread exit? I did this but the thread ...