.net

Why can't .NET dlls be included with the app using "copy local" - so that installed .NET is not needed

Quite simple question, and I really wanna know the reason (the real reason) behind this. Say you want to distibute a .NET app to computers without .NET installed (not even 1.1). Why can't we just include mscorelib.dll & others with out app? Is it because CLR must be installed in some way, to gain JIT capabilities for intepreting IL? I ...

How do I prevent other programmers from wrapping my assembly?

Can someone tell me what the best approach to protecting my component DLLs in .Net? I've written a few DLL components which will be publicly available. They will be licensed accordingly but I want to programmatically make sure that no one is using the components within their solutions illegally. Any ideas? ...

Taking over someone else's code

I am taking over someone elses code. What are some good ways to learn what that programmer did as quickly as possible? I have been running it, stepping through it and looking at the callstack. What else can I do? Sorry I forgot to mention, but there is little documentation and I have been trying to fix simple problems. Thanks! ...

xmlconfigurator.configure not throwing exceptions

I am trying to configure log4net for an application. System.IO.FileInfo fi = new System.IO.FileInfo("some junk file name"); log4net.Config.XmlConfigurator.Configure(fi); log4net.Config.XmlConfigurator.ConfigureAndWatch(fi); I got surprised, when above code is not throwing any exception !!!! when file doesn't exists , why log4net is n...

How to programmatically impose printing restrictions/DRM on PDF for confidential documents using Microsoft .NET

I came across stackoverflow from a podcast recommendation and I'm very impressed. This is my first post. I'm a Microsoft .net developer and I'm on a project with following requirements. 1) Confidential PDF document should be displayed to user with NO OPTION TO PRINT AT ALL. The reason to do this is the PDF's are for view only and users ...

Document-oriented Web Services in .NET

Hello It has been recommended that I design my web service in a 'document-oriented' fashion. After some searching - http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns/index3.html - and a few others - I am still at a loss as to what this means, in the trenches, in a C# Web Service. Could anyone provide the 'light-bulb m...

Google Doc Api: Spreadsheets with Charts

Is there a way to automate the process of creating a chart within a google doc from a .NET application. The workflow I'm looking for is... Create Excel Document. Upload to Google Docs. Create charts on the spreadsheet. (Can't figure this out.) Publish using ACLs. (bonus) I'm not sure if I'm supposed to use the Google Chart API for t...

Moving Web service from Http to Https

Hi, i have a web service and want to publish it as https.With current settings,i can publish it in http but i dont know what to do for https.What must i do in server?I searched something internet but couldnt find usefull and basic informations about it.I use Visual studio 2008.Thanks. ...

Do .net FlagsAttribute enums need to be manually valued?

To allow for different formatting options on a method that displays a news story, I've created an enumeration that can be passed in to specify how it gets displayed. [Flags] private enum NewsStyle { Thumbnail = 0, Date = 1, Text = 2, Link = 4, All = 8 } string FormatNews( DataRow news, NewsStyle style ) { String...

What are the problems associated with sending a Hibernate Proxy class to clients.

I have a POCO classes that I am using with NHibernate in a WCF service layer. And I am thinking about trying to send the NHibernate proxy classes down to a client. This is a client that I control. We handle record updates with a system wide reservation so there can only be one writable copy of this entity sent to a client at any given...

Puzzling .Net C# DeflateStream problem

Hi there, I wonder if anyone can shed some light on an issue that is driving me nuts: I am writing a compression decompression test class. To test it, I am serializing a dataset to a memory stream, compressing it, and uncompressing it and comparing the results. Compression is fine, but uncompression is where it hits the dirt. This ...

Role of DISCO - Web Services

I know every service we create (working with ASMX, .net 2.0) is attached with discovery document and I know the definition and purpose of Discovery document from numerous articles on web. I need to know how it actually works? What do we mean when we say It is through the discovery process that XML Web service clients learn that ...

Using List<Person> Distinct() to return 2 values

I have a Person class, with Name and AreaID properties. public class Person { public string Name; public int AreaID; // snip } I have a List<Person> with the potential for hundreds of Person objects in the list. e.g., 100 Persons with AreaID = 1 and 100 Persons with AreaID = 2 I want to return distinct list of AreaID's and ...

Checking website status in .NET

I need to build a .NET function that tests to see if a specific website is online. What is the best way to do this? I was going to simply ping the site, but I wondered if there was a more accurate method. Thanks! ...

Can't add namespace to XML at runtime

I have an XML file that I need to apply a namespace to at runtime. I’ve searched the net and most examples seem to suggest using the “SetAttributeValue” function. When I use the code below it throws an exception when I try to “ToString()” with the following error: The prefix '' cannot be redefined from '' to 'http://schemas.datacontract...

Enumeration Utility Library

I'm looking for a open source library or examples for working with Enum types in .Net. In addition to the standard extensions that people use for Enums (TypeParse, etc.), I need a way to perform operations like returning the value of the Description attribute for a given enumeration value or to return a enumeration value that has a Desc...

Applying a Style to a control that plays an animation based on a databinding to the view model and a control specific field?

So here's the situation, I have a control (code below) that plays an animation from a style datatrigger when a viewmodel property is equal to a value (Binding="{Binding OperatorState}" Value="Blah") Trouble is, although I can bind the BINDING I can't bind the value, as Value appears to have to be a literal. I wanted to do something like...

States and Behaviors for the WPF developer, where to find informational resources?

I've been doing WPF programming the "old fashioned" way (See charles petzold's applications = code + markup for the age of my extensions), and was recently becoming used to Blend 3, only thing is, there is this whole world I'm missing out on, sketchflow, states, transitions, behaviors, the VSM, all this I seem to be totally missing out o...

Tracking activity in a WebBrowser control from a Windows Form Host

Disclaimer: I'm asking on behalf of a client, and have not witnessed this issue first hand. He has a third party app that produces training media, which his training application presents in a WinForms app through the WebBrowser control. The interfaces he has been able to access on the WebBrowser control, on the surface of things, don'...

Logon & credentials issue in ASP.NET

Hi I am using asp.net. My requirement is as follows The user logs in to his/her system using his network credentials. After successfully logging into the system he opens the home page of the application like www.xyz.com/Index.aspx. Since he is not authorized he is redirected to www.xyz.com/logon.aspx But the crux here is he uses the ...