asp.net

ASP.NET runtime error: Length can not be less than zero. Parameter name: length

I am using visual studio 2008 on vista business. We just recently upgraded from xp. Now when I open a web project I get this error ASP.NET runtime error: Length can not be less than zero. Parameter name: length< in every .aspx file on this line of code: <%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"...

Selective Cache clearing across load balanced servers (ASP.Net)

We have a website that runs on two load balanced servers. We use the ASP.Net caching to help improve performance by caching high usage data. BUT, occasionally that data changes. When it does, we need to clear the relevant cache items on BOTH the load balanced servers. Does anyone have some easy to implement suggestions for how this c...

Custom Configuration for ASP.NET Apps (use of Application Settings or other frameworks)

I know how to create custom configuration handlers for my .NET application. There are plenty of posts on StackOverflow that cover what needs to be done. I've spent most of the day knocking out classes that derive from ConfigurationElement. I'm getting worried that this approach involves a lot of work - more work than I was expecting. I'...

Writing out a zip file doesn't work in IE7

I have inherited an old application that stores a zip file in a database and needs to retrieve this file. In Firefox is works fine, I can open the zip and each file inside it is fine. When I run it in IE7 I get the following error. Internet Explorer cannot download ProductContentFormImage.aspx from localhost. Internet Explorer ...

ASP.NET and Virtual Directories

We have an ASP system that we are going to replace with ASP.NET. This system is used by several different entities as an extension of their website (external of this system) using virtual directories, CSS, etc. Is this architecture still sound in the .NET world? Is there a better way of doing this? ...

Forms authentication failed for the request

I have a web application using cookieless forms authentication. Every day my event log has a ton of 4005 error codes (Forms authentication failed for the request). I believe this is happening because users are bookmarking pages while they are logged in so when they revisit the forms ticket in the url has expired, atleast this is the only...

disable some asp.net validation controls when a checkbox is checked

I'm using old fashioned ASP.NET validation (ugh) for a checkout process. I have a checkbox "I'll call with my credit card details". If checked I need to disable the required field validator and cc validator for the credit card number both on the client and on the postback. How do it do it? Thanks! ...

overwriting a web.config root file to enable customerrors tag

I have a situation where I want to catch 404 errors fired by HTML pages (not just aspx pages) but I only have access to the web.config of the root folder of my website, and all sub directories (note, i don't have access to the actual IIS server and I cannot create applications or change settings) So I did try the web.config customerrors...

How to improve startup performance on IIS / ASP.Net

Hi, I am using a particularly slow virtual web host (name withheld!) where disk performance can be very bad. Thus, the first hit to my ASP.Net web sites can take 1+ minutes to load. (After initial load, it's all in RAM and fine.) I am wondering if anyone knows a way to instruct IIS to pre-load the site? Is essence, emulate the first hit...

Can asp.net ajax controls be used as pure client side controls?

So, my question is, can any of the ASP.NET Ajax controls from the Control Toolkit be used without their server-side controls and without an ASP.NET Ajax ScriptManager. For reference, I am asking in the context of an ASP.NET MVC application. Clearly, some of the controls don't make sense in this model because they do postbacks to the s...

Where can you download Managed JScript for the DLR?

The lastest release (0.9 Stable) of the Dynamic Language Runtime contains IronPython and IronRuby, but it doesn't contain Managed JScript. Does anyone know where I can download the latest release of Managed JScript for use with ASP.NET and/or WPF? In case you aren't aware, JScript.NET and Managed JScript are too different things. What ...

Key Value Database For Windows?

Other than MongoDB and Memcached, what key-value stores run on Windows? Most of the ones I've seen seem to only run on Linux (Hypertable, Redis, Lightcloud). Related links: http://stackoverflow.com/questions/639545/is-there-a-business-proven-cloud-store-keyvalue-database-open-source http://www.metabrew.com/article/anti-rdbms-a-list-of-...

Jquery Functions for operations on gridview with checkboxes

Hi all, The first column in my gridview (gvAvailable) is a currently checkbox column "chkSelect". The way it works now is that a user can check multiple checkboxes on a gridview, but I would like a jquery function to deselect all the checkboxes on the gridview except for the checkbox that was clicked. I was also looking for a way to ac...

asp.net validations

I want to add a validation control to check if the first name and last name of a person entered consists of characters from A-Z and not any special characters and numbers? How to do it? ...

VB .NET Creating Additional Columns in Gridviews

Im trying to add data into a new column I have created in my gridview. I create the column with the code below: Dim Field As New BoundField Field.HeaderText = "Cummulative Amount" Dim Col As DataControlField = Field Me.GridView1.Columns.Add(Col) Now I need to go in and add data for the rows below the column. I have seen ppl saying I...

User.Identity.Name is not returning the correct credentials when using Windows Authentication in ASP.NET MVC

I am using Windows Authentication in my ASP.NET MVC application and I am prompted to enter credentials on my webserver which is a domain member [I have domain credentials and can authenticate fine] however when my controller action calls "User.Identity.Name" in an attempt to check a database value against the currently logged in user thi...

Error When Added MasterPage

Server Error in '/' Application. -------------------------------------------------------------------------------- Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature ver...

Currency Library

I am looking for a .Net class/library to use with currency acronyms in the same way the TimeZoneInfo class works with timezones. I need to populate a drop down list with these acronyms and store the result in a databse. This value will be used to retrieve up to date exchange rates from the web at a later stage. Any ideas? :] Thanks e...

asp:to add web control in table cell of table control (web control ).

i have inserted a table web control in a panel.in that table 's cells i want to insert other user control like label, panel .i am not able to do that.is there any difference in normal table for layout and table web control.if it is.then how can i insert simple table in a panel. ...

Can anyone recommend a tool for generating a simple C# ASP.Net Web Application for a SQL Server database?

I have a SQL Server 2005 database which holds a fairly basic schema. I'm fine with accessing it through Management Studio, but I need to be able to provide read-write access to other internal staff so they can modify the contents of certain tables. Can anyone recommend a tool (preferably free) that can look at a SQL Server database and...