.net-3.5

IIS7 Compression on GoDaddy

Hi! I'd like to use gzip/deflate compression in my website on IIS7 basic shared hosting plan on GoDaddy server. I've applied many solutions that I found in web but none resolved my problem. My pages are not being compressed at all, the size keeps the same after processing them. I've tried to create a HttpHandler using DeflateStream bu...

Team City build fails after upgrade to VS 2010

Hi All, I have a project that currently compiles happily on my dev machine using VS 2010 (presumably using MSBUILD v4.0), but it fails under MSBUILD v3.5 in Team City (running on a VM based on Win 2003 server w/ .NET 2, 3.5 and 4 installed). This project is newly upgraded to 2010, and is now failing on the CI build. I've Googled this an...

Validate user account via email link

Really sorry because this is almost "please send me the code" - although really it's "please send me a link to another discussion" I am setting up a .net membership system and need to validate users from the email address they provide via a "click here to validate your account" type link. Just wondered if anyone knew of any good tutori...

Align the row values in a GridView

I need to right align the values in a column of my gridview in asp.net 3.5 How can I do that? <asp:GridView ID="gvSearchResults" runat="server" onpageindexchanging="gvSearchResults_PageIndexChanging" AutoGenerateColumns="False" CssClass="Gr...

Assembly runtime version v2.0 in Visual Studio 2010 .net 4 project

Hello, I downloaded a library(SquishIt) I want to use in a Console Application. I am working in Visual Studio 2010 so the Target framework is set to ".Net Framework 4" in the properties of the application. This causes the following error in my code: The type or namespace name 'SquishIt' could not be found (are you missing a using di...

Does .NET 3.5 SP1 SerialPort class append extra 0's on transmission?

Update Turns out the error was in the crypto processor code, that is fixed. But now running into what seems like it might be a handshaking issue. On first transmission, we get a single byte back from the device with value 0xFF(don't know why, the engineer I'm working with isn't too experienced with RS-232 either). Then, things run as n...

can i call a .net 2.0 dll in .net 3.5?

Hi All, I am migrating to .net 3.5 and I want to know whether I can call from my 3.5 application, old .net 2.0 dll's methods? Some external API's are in .net 2.0 dll. So I need those. Kindly let me know. Thanks. ...

How to do a partial copy of a remote SQL Server Express database to a local SQL Server Express database?

I'm in a situation where I need to create a partial copy of a database from a remote SQL Server (2005/2008 Express Edition) and store it in a local SQL Server (2005/2008 Express Edition) database. The local copy will have the same schema definition, but contain only parts of the data from the remote database. The local database has to ...

Passing a parameter value to SQL stored proc of an optional string in asp.net

I have a search page, which has Date text field. The user may or may not populate this field. But the field is a parameter of a SQL stored proc that gets called to execute the search query. When I walk through the code (and the Date field is blank), I get an error that the value could not be converted to DateTime How can I convert a nu...

Windows Service Looking for app.config and not app.exe.config

I'm trying to install a Windows Service on a 2008 server. The service was built with VS2010, targeting the 3.5 framework. A simple setup project was used to deploy the service. The install works fine and the service starts up appropriately. The bizarre issue I'm having is when the service executable, MyService.exe, is run it is looki...

Interesting libraries based on LINQ

Every man and his dog seems to be adding an implementation of LINQ to something. http://linqtotwitter.codeplex.com/ http://blogs.msdn.com/b/aconrad/archive/2007/12/10/linq-to-rest.aspx http://linqtowikipedia.codeplex.com/ http://www.codeproject.com/KB/linq/LINQtoCSV.aspx http://mhinze.com/linq-to-nhibernate-in-10-minutes/ it's even b...

Should repositories use the same context instance within the Entity Framework 1.0

Hello, I have started to look at the Entity Framework for a project I am doing and going down the road of using a BLL against it via the the repository pattern. As I understand it for each entity I should create a repository for it so I would have public class UserRepository : IRepository<User> { ... } and public class AccountReposi...

.NET 3.5 - Hashing a password using System.Cryptography

Hi, I am a bit of a newbie around Security nitty gritties and especially around Cryptography. In the application we are building(ASP.net application built on .NET 3.5), we are currently using Databases to save our users authentication information (AD etc is not an option at this point). The intention is to do a one way salted hash of t...

refresh grid without page post back, please advise

I am doing some grid work just like a stock exchange application which will have good data volume and page should be automatically refresh after some mentioned time say 1 min or 30 sec without being post back. What is best way to do this ? Should I use grid with ajax or grid with ajax and web service should be used ? If possible please ...

System.BadImageFormatException for CustomAction in Visual Studio 2010 Setup project

Hold your guns! I did check to see if all the project outputs are set to the same processor architecture (in this case, x64). They are. So what am I trying to do? Wrote a plugin for Autodesk Revit Architecture 2011 x64 targets .NET 3.5 x64 Created a setup project Created a custom action (RegisterRevit2011Addin) for registering plugin...

How to read read processing instruction from an XML File using .NET 3.5

How to check whether an Xml file have processing Instruction Example <?xml-stylesheet type="text/xsl" href="Sample.xsl"?> <Root> <Child/> </Root> I need to read the processing Instruction <?xml-stylesheet type="text/xsl" href="Sample.xsl"?> from the xml file. Please help me to do this ...

How to generate SQL COUNT(*) OVER (PARTITION BY {ColumnName}) in LINQ-to-SQL?

Is it possible to generate the following SQL query by using LINQ-to-SQL query expression or method chains which is defer-executable? Data Structure Select Distinct ClassRoomTitle, Count(*) Over(Partition By ClassRoomNo) As [No Sessions Per Room], TeacherName, Count(*) Over(Partiti...

How to pass a delegate to create an expression tree that is a MethodCallExpression

I'm looking to 'generalise' some code in a .NET 3.5 MVC application and have stumbled into a problem. Background I have a SomeController class with some actions: public ActionResult Renew(string qualification, int tierId) { ... } public ActionResult Reinstate(string qualification, int tierId) { ... } public ActionResult Withdraw(strin...

[EntLib 5]: Logging between assemblies

I've got a project that I'm working Enterprise Library logging into, and that application is made up of multiple assemblies. The UI assembly, the domain assembly and some others. Is there a way to have the logging all go to the same location (in the case of rolling flat file)? Edit> Now that I look at it further, can you even use EntLib...

regular expression for money in asp.net

regular expression for money in asp.net ...