asp.net

Add a IIS host header to website programmatically

I would like to setup a admin page (ASP.NET/C#) that can add IIS host headers to the website that the admin page is hosted on. Is this possible? I dont want to add a http header - I want to mimick the action of going into IIS manually, bringing up the properties of the website, clicking advanced on the website tab, and in the advanced ...

asp.net and HTTP compression - shared hosting

What are my options when it comes to implementing page compression is asp.net.Right now I have a custom home grown httpmodule and its not very mature. Google links me to MbCompression. The project has few views and downloads which discourages me a bit. Edit: I am under shared hosting, which limits my access to IIS settings ...

Page Lifecycle - Using FindControl to reference a control created programatically during page load

Hi, I'm creating some text boxes on my form programatically which I need to reference later using FindControl. I've put the FindControl instruction in the page load method after the code which creates them but get an error: "Object reference not set to an instance of an object." I assume this is because the textbox controls are not c...

Guidelines for asp.net website loading estimation?

I wonder if there is any good guideline for system administrators to calculate the resources needed to host an ASP.NET website? I want to do some estimates on the processing power needed so I know what kind of VPS/Cloud I need to get. ...

How to use Process Monitor to Resolve an UnauthorizedAccessException.

I'm trying to write a log file from an ASP.NET application under IIS7, but keep getting the following exception: UnauthorizedAccessException "Access to the path 'C:\Users\Brady\Exports' is denied." I've been advised to use Process Monitor to help resolve this, but it's quite a complex tool, and I really don't have time to spend explor...

Newely explained concepts in .net Framework 3.5.

We have developed our website(Business users website) in .net Framework 2.0 Our client us to migrate to .net Framework 3.5. I am not interested in developing the same thing in both the frameworks. Please anyone tell me some of the new features like card space, work flow, presentation foundation concepts in .net framework 3.5 and how w...

Getting the Bound Field Name at Run Time in ASP.Net

If I have a control, within a FormView, that is bound using a <% #Bind(...)%> expression. At run time, is there any way of retrieving the name of the field the control is bound to. To be clear, if the expression is <% #Bind("UserName") %> I want to return the string "UserName". ...

How to generate ASP.NET page every time when using master pages?

I'm moving an old VBScript web site over to ASP.NET, so I'm starting to use master pages instead of #includeing lots of other files with server side VBScript in them. How can I stop the pages (as in the ones that are based on master pages) from being generated once and then stored? If I make a change to the master page (or any page bas...

Windows authentication problems using asp.net

I have an asp.net application that should access data from two SQL Servers. One of the SQL Servers is present on the same machine as IIS (let us call it SQLSERVER1) whereas the other SQL server is present on another machine (SQLSERVER2). The connection strings are trusted for both the SQL servers. Impersonation has been set to true in m...

Why should I create my child controls in CreateChildControls() on a CompositeControl?

Ok so the obvious answer is, because the flow of a composite control demands my childcontrols to be created at a certain point in time. I got a problem i think other people must have had as well. My control is a composite "container/collection" control. It will be fed with an object and based on that objects data it will create a number...

ASP.Net: Approaches to multilingual websites with Javascript and AJAX

We've recently completed phase 1 of a ASP.Net website in English and French. We went with using resource files to store language specific strings, but because the site used ASP.Net AJAX and javascript heavily we rigged up a solution to pass the right files through the ASP.Net pipeline where we could catch "tokens" and replace them with t...

How do I create a custom menu navigation in ASP.NET?

UPDATE Here is my final working version: <% Dim theUrl As String = Request.Url.Segments(Request.Url.Segments.Count - 1).ToLower Dim oList As New List(Of String()), openTag As String = "" oList.AddRange(sqlStuff.getNavPages()) For Each oItem As String() In oList If oItem(1) = theUrl Then openTag = String.Format...

How would you reference lookup/meta data?

I've run into this issue quite a few times and never liked the solution chosen. Let's say you have a list of States (just as a simple example) in the database. In your code-behind, you want to be able to reference a State by ID and have the list of them available via Intellisense. For example: States.Arizona.Id //returns a GUID ...

Should I pursue ASP.NET WebForms or ASP.NET MVC

Firstly, I'm a software engineer doing web development in ASP.NET. We have a custom framework that we use that sits on top of .NET so most of my development work leverages more of our internal framework and less of the traditional web forms model. I've done web development for a couple years on my own as well, but I mostly use LAMP (wit...

Report handler architecture question

I am attempting to have a ReportHandler service to handle report creation. Reports can have multiple, differing number of parameters that could be set. In the system currently there are several different methods of creating reports (MS reporting services, html reports, etc) and the way the data is generated for each report is different...

Code to get *.aspx in a website

Is there a method to get all of the .aspx files in my website? Maybe iterate through the site's file structure and add to an array? ...

Batch file uploading with a flashplayer dialog.

I'm currently looking at ways to allow people to select multiple files at once to batch upload images. I'm evaluating these options for my ASP.NET web app: YUI Uploader Flajaxian SWFUpload Dojo Toolkit Multi file uploader I'm leaning toward YUI because the documentation is clear and I basically already wrote the file uploaders and th...

Are there caveats to dynamicly creating a form with javascript?

I have to do a cross site POST (with a redirection, so not using a XMLHTTPRequest), and the base platform is ASP.NET. I don't want to POST all of the controls in the ASP.NET FORM to this other site, so I was considering dynamicly creating a new form element using javascript and just posting that. Has anyone tried this trick? Is there an...

Asp.Net Static method to refresh page

I have a page that is hitting a webservice every 5 seconds to update the information on the page. I'm using the DynamicPopulateExtender from the Ajax Control Toolkit to just populate a panel with some text. What I was wanting to do, is if a certain condition is met, to refresh the page completely. Am I going to be able to do this in t...

How to grab AD credentials from client machine in a web application.

Is it possible to grab activedirectory credentials for the user on a client machine from within a web application? To clarify, I am designing a web application which will be hosted on a client's intranet. There is a requirement that the a user of the application not be prompted for credentials when accessing the application, and that i...