.net

Is there a good .Net CSS aggregator that combines style sheets and minifies them?

I am looking to see if there is an open source/free project that provides a CSS manager. I am looking for this mainly for performance tweaking and hoping there is a readymade project rather than building from scratch. Features I am looking for include: Combines multiple .css files into a single css file Optionally minifies the resulti...

How to include simple collections in ConfigurationSection

Is there a way for me to include a simple array of strings, or List<string> on my custom subclass of ConfigurationSection? (Or an array or generic list of simple data objects, for that matter?) I'm becoming familiar with the new (and VERY verbose) ConfigurationSection, ConfigurationElement, and ConfigurationElementCollection classes, b...

Good obfuscator for VS2010 and .net v4 projects with built in visual studio integration

I am looking for a good obfuscater that has visual studio integration, can be commercial or free, and has to work with vs 2010 and .net v4. Something that is as hassle free as possible, and can obfuscate my release builds ...

Render SSRS .RDL to PDF and just open it.

I tried to be the most descriptive I could. Ok, so since I've never done anything like this before, I guess it's better to ask before starting at all to just don't get the whole process wrong. We have a report that has to be called from an ASP.NET application, it could be a simple button. Through the code-behind, I gotta pass in a para...

.NET - downloading multiple pages from a website with a single DNS query

I'm using HttpRequest to download several pages from a website (in a loop). Simplifying it looks like this: HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create( "http://sub.domain.com/something/" + someString ); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); //do something I'm not quite sure ...

Send Automated Email through Windows Service that has an embedded image using C#

I already have a C# windows service that we use internally to monitor a directory on our network and when it detects a change sends off an email using our internal SMTP server to the specified groups of people. Now I need to embedd an image in that automated email. I understand that I need to create an AlternateView and a Linked Resour...

Entity Framework: Setting EntityReference EntityKey causes exception on save

I have a table with a ModifiedUserID field that is a foreign key to a User table. In entity framework, I'm loading the first table, but not the users table. I have the user ID of the current user, and would like to set the ModifiedUserID to that value for all entities that have been modified prior to saving. Before calling SaveChang...

webBrowser1.Document.MouseOver in .net to get XPath to the object in IE6

I'm doing test automation with Selenium and have now ended up testing an old .NET 1.1 app that only runs in IE6 that is kind of semi-ajax. Most of the objects does not have any ID tags etc and this complicates things writing the scripts. Now I'm trying to make my own little selenium-recorder for IE6 and I have made a small C# .Net proje...

What type of things can cause sgen msbuild task to fail intermittantly with Access Violation?

In our MSBuild file for our project we sgen an assembly containing classes used during xml serialization. The classes are generated via xsd.exe. We use the following SGen task configuration. <SGen ToolPath="$(SdkPath)" ShouldGenerateSerializer="true" UseProxyTypes="false" BuildAssemblyName="AssemblyName.dll" ...

How Many .NET DataSources should I have?

I'm fairly new to database programming in .NET. If I want to call several existing queries from the same database for different tasks, should I have one DataSource per database, per database connection, or per query? ...

C# - Basic question: What is '?' ?

Hi, I'm wondering what ? means in C# ? I'm seeing things like: DateTime? or int?. I suppose this is specific to C# 4.0? I can't look for it in Google because I don't know the name of this thing. The problem is I'm using DateTime and I have a lot of cast errors (from DateTime to DateTime?). Thank you ...

Load SQL query result data into cache in advance

I have the following situation: .net 3.5 WinForm client app accessing SQL Server 2008 Some queries returning relatively big amount of data are used quite often by a form Users are using local SQL Express and restarting their machines at least daily Other users are working remotely over slow network connections The problem is that aft...

How is application virtualization implemented?

I am trying to understand how software like App-V and sandboxie (http://www.sandboxie.com/) work. But for the life of me, I can't think of anything that could make this possible. How do they intercept API calls and trick the target software? If someone would say that it's just magic and pixie dust, I would believe them. Seriously though,...

Are there any .NET classes/functions that are optimized for multiple cores?

Are there any .NET classes/functions that are optimized for multiple cores? I know that the developer is supposed to do this himself/herself. But seeing how we are getting CPUs with more and more cores and there are still many developers who do not use multithreading, if we have this functionality built in, it could increase performance...

Multiuser XML document "database" for asp.net app

I was thinking about a way to allow multiple users to get CRUD access to an XML document in an asp.net app. The operations would obviously have to be made under the assumption of a multithreaded environment. For perf reasons, would it make sense to cache the document, and use a mutex on that cached version? When would changes be flush...

Rackspace Cloud rewrite jpg causes session reset

This may be the .NET version of this question. I have an image script with the following: ... Response.WriteFile(filename); Response.End(); I am rewriting .jpg files using the following rewrite rule in web.config: <rule name="Image Redirect" stopProcessing="true"> <match url="^product-images/(.*).jpg" /> <conditions> <add in...

Unable to verify body hash for DKIM

I'm writing a C# DKIM validator and have come across a problem that I cannot solve. Right now I am working on calculating the body hash, as described in Section 3.7 Computing the Message Hashes. I am working with emails that I have dumped using a modified version of EdgeTransportAsyncLogging sample in the Exchange 2010 Transport Agent SD...

onCommand on button not firing inside gridView??

This is really driving me crazy. I've got a button inside a gridview to remove that item from the gridview (its datasource is a list). I've got the list being saved to session anytime a change is being made to it, and on page_load check if that session variable is empty, if not, then set that list to bind to the gridview. Code Behind: ...

Styles Don't Update

I am trying to use theming within my application, but I am having a problem with my styling not being applied correctly. I run the following lines of code: App.Current.Resources.MergedDictionaries.Clear(); ResourceDictionary rd = new ResourceDictionary(); rd.Source = new Uri( "/Style2.xaml...

Binding a DropDownList inside a DetailsView

Hello, I'm having problems trying to populate a dropdownlist from the database. When I'm trying to set the datasource I can't find the dropdown control, it's in a DetailsView so I think it might have something to do with it only being created when it's in edit mode. It still says it's in current mode when I'm editing though, so not sure...