asp.net

HttpHandler is not processed when its associate HttpModule is processed

In our asp.net 2.0 application we have the an HttpModule and HttpHandler. They are registered in web.config to handle requests for certain file types. The request is initiated asynchronously from client side using MS AJAX. I noticed something strange: HttpHandler:ProcessRequest is not entered on every HttpModule:EndRequest which seems l...

Is ASP.NET MVC a bad choice for a large enterprise project?

We are about to embark on a large enterprise application. I am seriously considering using ASP.NET MVC because: We need to use Microsoft technology (biz logic is all C#) Performance is critical I'd like to test as much as possible My team has only used PHP for web development, but are very experienced with .NET winforms (so either w...

Programmatically Select Item in Asp.Net ListView

After doing a quick search I can't find the answer to this seemingly simple thing to do. How do I Manually Select An Item in an Asp.Net ListView? I have a SelectedItemTemplate, but I don't want to use an asp:button or asp:LinkButton to select an item. I want it to be done from a URL. Like a QueryString, for example. The way I imagi...

Equivalent of ASP.NET HttpModules in PHP

what is the equivalent of ASP.NET HttpModules in PHP? If there are any how can I include them for that specific application (not globally) in other words what is the equivalent of web.config Example : I need to log the request and the headers, if the server is returning a HTTP 500 error irrespective of the code which is run. In ASP....

Asp.Net Menu control with Tab Style (Rounded Corners)

Can any body give me a better idea to come up with a Asp.net 2.0 Menu control with rounded corners? ...

Amazon S3 Url rewrite

How can I change the Amazon S3 url from http://bucket.amazons3.com/imagepath.jpg to http://image.mydomain.com/imagepath.jpg EDIT: Basically the whole reason for this is to hide the amazon s3 url from my users. I was thinking about a HttpModule that would redirect the request from image.mydomain.com to bucket.amazons3.com. But ...

Accessing a UNC drive in ASP .NET?

I have two different sets of image files that reside in the root images directory of two different web sites on two different web servers. For arguments sake, let's say the first web server is called web1 and has a primary ip address of 111.111.111.111 and the second web server is called web2 and has a primary ip address of 111.111.111.1...

How do I pull data from my old server to my SQL server?

I want to write a code that transfers data from on server to my SQL Server. Before I put the data in, I want to delete the current data. Then put the data from one to the other. How do I do that. This is snippets from the code I have so far. string SQL = ConfigurationManager.ConnectionStrings["SQLServer"].ToString(); string OLD = Co...

Can you build ASP.net User controls as assemblies?

Is there some setting in VS2K8 or some command line utility that can compile my user controls as .net assemblies? Is it even possible? ...

ASP.NET MasterPage + Javascript Error

After converting an ASP.NET webform (v3.5) to use a master page, I started getting a strange Javascript error. The content page has a block of javascript. Here it is: <script type="text/javascript"> var attCount = 0; function CreateAttachmentControl() { var newAtt = document.createElement('span'); var newAttN...

What is the right way to use the AttributeCollection.Render method?

I've created a web control and I want to pass the element attributes through during the render phase. I would prefer use writer.RenderBeginTag() and RenderEndTag() but this is the only way I can seem to integrate the attributes successfully: public override void RenderBeginTag(HtmlTextWriter writer) { writer.Write("<"); writer.W...

How would you sprinkle-in ASP.Net MVC into an existing Web Site Project?

I have a legacy (haha) ASP.Net Webforms Web Site Project in Visual Studio 2008 SP1, that I would like to gradually introduce some MVC functionality into. Most of the information I can locate on how to integrate ASP.Net MVC with WebForms seems to assume the use of a Web Application Project. However, it seems impossible to find informati...

Anyone using Memcached with ASP.NET on a distributed farm?

We have 22 HTTP servers each running their own individual ASP.NET Caches. They read from a read only DB that is only updated off peak hours. We use a file dependency to invalidate the cache, prompting the servers to "new up" their caches...If this is accidentally done during peak hours, it risks bringing down our DB cluster due to the s...

ASP.net session is shared by default?

Hey there, I'm making an application that makes use of session variables. I have created a class "HistoryLine" and another called "HistoryLineCollection" with a list of "HistoryLine"s in it. I then save the instance of the HistoryLineCollection to the session like this: Session["HistoryLines"] = hLines; The problem is that when I watch...

Deleting a file in C#

Seems like it should a really easy topic, all the examples everywhere are just a couple of lines however no decent explainations, and thus I keep running into the same error without a solution. In short this part of the applicaion runs like so Pulls images from db Creates actual images files in a temp folder creates pdf with images i...

Book rec(s) for an ASP.NET/C# developer looking to build in JSP+Tomcat?

I'm a senior-ish C# developer used to ASP.NET & IIS, but a project's come along for which I'll need to use Java/JSP and Tomcat, both of which are new to me. I've got a bit of experience with Java, but none with Tomcat or JSP, so I'm looking for a book ( or books) that'll help me get up and running with JSP and Tomcat quickly. (The proj...

What is the best way to implement role-based security in ASP.Net?

The site I'm working on is mid-sized, 3 developers, a few thousand users, and is very critical to the small business running it. So what I'm getting at is, this is not a Fortune 500 company, but is a serious enterprise needing to implement role-based security in a time/budget efficent way that is still pretty simple to use and has a hig...

asp.net mvc view data

I create a class to hold view data for two different types from my model. class FooBarViewData { public List<Foo> Foos { get; set; } public List<Bar> Bars { get; set; } } I typed my view to a FooBarViewData but it fails to find the type. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" ...

asp.net mvc view code

I am dynamically generating a table to present some tabular data. Normally I would not go near tables, but for this kind of data it is appropriate. I am noticing my view code is becoming very spaghetti like. Assigning classes on cells and rows in the body of loops is starting to look just awful (bad flashbacks to my asp 3.0 days). ...

are there any ASP.NET with Voice Recording sample codes?

Hi there, I am wondering if there is any codes sample for ASP.NET with Voice recording. Ok, Basically, i want to create a web page that allow user to click a record button and record his voice thru his/her microphone and then convert it into mp3 file, then i want to click PLAY button to play what was recorded. I have searched google a...