.net

How to determine the generic font family name for a System.Windows.Media.FontFamily

Is there any way to interrogate a FontFamily instance to determine the name of the generic family group that it belongs to (serif, sans-serif, cursive, fantasy, monospace)? I understand that these family groups are prescribed by CSS and are therefore not directly related to the FontFamily class, but I am hoping that the underlying fonts...

How does ReSharper know this return type is never null?

I'm using ReSharper 5.0, and am wondering how its code analysis function knows to higlight the following assemblies == null with the comment "Expression is always false". var directory = new DirectoryInfo("somedir"); FileInfo[] assemblies = directory.GetFiles("*.dll"); if (assemblies == null <<--- this is highlighted with "Expression i...

Wf 4 Receive Activity: Difference between Messages and Parameters

Receive activities in WF4 can take two kind of values, Message or Parameters. Does anybody know the different between these two? cheers ...

Enable authentication in ASP.NET webservice

How do I configure .NET webservice to require all consumers to supply credentials, then verify their validity against database table? ...

ASP .NET PDF Documents Storage in Database Using XML

Hi, Please see the code below. What I am trying to do is to store some PDF file names in XML format inside a database 'PDF_Storage' field. The code kind of works but is not polished enough: If there is no data for a row then I am putting a hard-coded xml file and then manipulating (Uploading new PDF; Deleting PDF) using a GridView contro...

Scheduling a single-fire event.

I'm writing an application which requires a status bar update for while a database is being loaded. I set the label to "Database loading..." then load the database with a BackgroundWorker. When the worker completes, I set the label to "Database loaded." This is only done on startup, however, and I don't want the label to be visible for m...

Wrong value with double.Parse(string)

Hi, I'm trying to convert a string to a double value in .Net 3.5. Quite easy so far with double.Parse(value); My problem is that values with exponential tags are not right converted. Example: double value = double.Parse("8.493151E-2"); The value should be = 0.0893151 right? But it isn't! The value is = 84931.51!!! How can that be...

how to print dotted characters in PDF Document using ASP.net

hi techies i am developing a small application using vb.net and asp.net here i have to generate pdf file from asp.net page which should contain words , the appearence of the letters of this word should be similar to ecofont please suggest a method to achieve this thanks in advance ...

How to extract a rar file in C#?

I want to extract .rar files using cmd shell so I wrote this code: string commandLine = @"c:\progra~1\winrar\winrar e c:\download\TestedU.rar c:\download"; ProcessStartInfo PSI = new ProcessStartInfo("cmd.exe"); PSI.RedirectStandardInput = true; PSI.RedirectStandardOutput = true; PSI.RedirectStandardError = true; PSI.UseShellExecute = ...

How to use .Net System.IO; System.Net; System.Net.Sockets; from Visual Studio C++ project?

How to use .Net System.IO; System.Net; System.Net.Sockets; libs from Visual Studio C++ project? ...

wpf PathFigure to draw/show/display text

How can we draw text using PathFigure? ...

Increasing .NET knowledge

I would like to see if anyone can offer any advise on furthering my knowledge in the .NET environment... Here a little background. I went to a university and got my BS in Computer Science (mostly worked in C, Java, and C++). Took a job right out of college for a small business doing internal development and a few commercial projects...

Error connecting to linked server after recompile

I have a ASP.NET MVC website in IIS 7 running against a SQL Server 2008 R2 database, in which I have a linked server set up. The linked server is set up so that a SQL account from my database is linked to a SQL account on the linked server. All works fine until I recompile my website, and then it can't connect to the linked server anym...

How to debug VB.NET calculated Function Returns without a return variable

It's often the case that I can write a nice tight little VB.NET function, and when it comes time to do the Return statement, it's really natural to just return the result of a quick calculation or a method call. However, this makes it difficult if I need to step through the debugger to see what is going to be returned from that Function...

Fully Qualified Type Resolution in .NET

Simple question (comes up in SharePoint 2010, but that's not really relevant). How does: <add name="LdapMembershipProvider" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ...resolve when the actual type (LdapMembershipProvide...

DotNet - What is int* ?

Hi, simple question, I import a DLL function and the parameter are int*. When I try to enter Method(0), I get an error which says: "int and int* can not convert". What is that meaning? ...

What is the best way to send/receive a file to a SFTP server in .NET?

I am looking to connect to a SFTP server and both push and pull a file. Initial searches didn't turn up any straightforward "built in" support in .NET, so I may have to buy a third-party library. For authentication, I want to use Public Key Authentication to avoid having to manage periodic password resets, too. ...

Using RTMP or RTSP protocol in C#

Do you know any library that allows me to send from C# an encoded audio/video stream to a streaming server using RTMP or RTSP communication protocol ? ...

Advantage of using TFS over third party tools combination for entire software Lifecycle.

I need to pitch-in for using of Team Foundation Server 2008 as a complete Lifecycle management tool including Requirements, Source control, Daily builds, Test Cases integration, Bug tracking. Please help me with some of the advantages of using TFS over some of the cheaper third party tools like say, Tortoise/SVN + BugTracker + CruiseCon...

Problem receiving Json response with responseType set to Json in Jquery AjaxUploader.

hi, I am using jquery ajaxuploader in my asp.net website.When I set responseType: 'json' in 'AjaxUpload' the onComplete is not getting executed.In the firebug I am able to see the json response as {"Error":null,"Success":true} along with the entire page markup to which the 'AjaxUpload' has made the request. I am having trouble understan...