asp.net

server.mappath("."), server.mappath("~"), server.mappath(@"\"), server.mappath("/"). What is the difference?

Can anyone explain the difference between Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\") and Server.MapPath("/")? ...

How to find out which account my ASP.NET code is running under?

I am getting an 'Access to the path is denied" error message when running in debug mode. I have tried granting permissions to {MACHINENAME}\ASPNET and to NETWORK SERVICE but this hasn't made any difference. I have also tried < impersonate = true /> using an admin account, this also made no difference. So how do I establish exactly which ...

lsass.exe starts maxing CPU after ASP.NET web app deployment

After deploying a new build (mostly changed DLL's) of an ASP.NET web app the CPU on the server is now jumping to 100% every few seconds and the culprit is lsass.exe. Do you think that the deployment of the asp.net web app to the server and this problem are related? (or a coincidence that it happened at the same time?) More info: This i...

When handling large file transfers in ASP.NET what precautions should you take?

My ASP.NET application allows users to upload and download large files. Both procedures involve reading and writing filestreams. What should I do to ensure the application doesn't hang or crash when it handles a large file? Should the file operations be handled on a worker thread for example? ...

Best Way to DataBind a List with sub-related content (For example, SO's questions with tags)

Using ASP.net 2.0, how do I present the information to the user similar to the Questions list on SO where each question has some child items (like the tags). I would probably be making two separate queries, one to first find the list of questions, then another query to find all tags which belonged to the list of questions. Approach 1: ...

ASP.NET MVC Web application vs ASP.NET Web Application

Other than the fact that ASP.NET MVC Web Application has more clarity in its implementation of the MVC pattern and that it strictly follows the MVC pattern, how is it different from ASP.NET Web Application? If you make your ASP.NET Web Application have a Business Logic Layer, Data Access Layer and strictly make all data queries using th...

Best book on ASP.NET 3.5 (C#) programming?

I have to choose one of the following books, and I didn't find many reviews besides the comments on the Amazon pages (which are mostly positive): Programming Microsoft ASP.NET 3.5 --- by Dino Esposito (Microsoft Press) Professional ASP.NET 3.5: In C# and VB --- by Bill Evjen, Scott Hanselman, Devin Rader (Wrox) Programming ASP.NET 3.5 ...

filtering on gridview control VS-2008

This is what I am working with to get back to the web dev world ASP.Net with VS2008 Subsonic as Data Access Layer SqlServer DB Home Project description: I have a student registration system. I have a web page which should display the student records. At present I have a gridview control which shows the records The user logs on an...

Can I access session state from an HTTPModule?

Hi, I could really do with updating a user's session variables from within my HTTPModule, but from what I can see, it isn't possible. UPDATE: My code is currently running inside the OnBeginRequest () event handler. UPDATE: Following advice received so far, I tried adding this to the Init () routine in my HTTPModule: AddHandler contex...

Can you change the height/width of an ASP.NET control from a Javascript function?

What is the best way to change the height and width of an ASP.NET control from a client-side Javascript function? Thanks, Jeff ...

ASP.NET MVC and Ajax

From what I've read about ASP.NET MVC, it appears it requires posting to work, is there any working example (With source available) of a ASP.NET MVC website that has no postbacks with the help of Ajax? (I checked the related questions earlier but couldn't find what I was looking for) Thanks in advance. edit: I need jQuery solutions no...

How to Make ASP.NET MVC Recognize IHttpAsyncHandler from IRouteHandler.GetHttpHandler() ?

In this question & answer, I found one way to make ASP.NET MVC support asynchronous processing. However, I cannot make it work. Basically, the idea is to create a new implementation of IRouteHandler which has only one method GetHttpHandler. The GetHttpHandler method should return a IHttpAsyncHandler implementation instead of just IHttpH...

How to drop/discard a Request in ASP.NET?

I'm trying to figure out how to drop/discard a request, I'm basically trying to implement a blocked list of IPs in my app to block spammers and I don't want to return any response (just ignore the request), is this possible in ASP.NET? Edit: Some of the answers suggest that I could add them in the firewall, while this will certainly be ...

Is there a port of memcache to .Net?

I am interested if there is a port for the server implementation. ...

Successful sites using Asp.NET and the Facebook API

Are there any sites out there that have been built with asp.net and facebook api? I am looking for some ideas and inspiration for doing some social networking web programming. I did find some asp.net/facebook blog entries but still could not find any site that has successfuly done some work in this area. ...

asp.net menu control not rending correctly in safari

The site I'm working on is using a Databound asp:Menu control. When sending 1 menu item it renders HTML that is absolutely correct in Firefox (and IE), but really messed up code in Safari and Chrome. Below is the code that was sent to each browser. I've tested it a few browsers, and they are all pretty similarly rendered, so I am only...

I need to get the password which is Hashed in ASP.net

I am storing all my passwords in the form hashed. I need to retrieve these passwords Eg My password is "123456" I save this as hashed "3453474852dfdsfdsfdf" value. I need to retrieve the original password from the hashed value. (Get Password). How can I do that?. I am doing SHA1 hashing algorithm. ...

How to determine if ASP.NET page is in cache or not?

I need to find whether the web page is cached or not. That s loaded newly or its appeared in cache. ...

ASP.Net MVC and RenderPartial w/ relative paths

I've been playing around with ASP.NET MVC and had a question. Or maybe its a concern that I am doing this wrong. Just working on a lame site to stretch my wings a bit. I am sorry this question is not at all concise. Ok, here's the scenario. When the user visits home/index, the page should show a list of products and a list of articl...

Parsing PlainText Emails from HTML Content (ASP.NET)

Hi All, Right, in short we basically already have a system in place where the HTML content for emails is generated. It's not perfect, but it works. From this, we need to be able to derive a plaintext alternative for the email. I was thinking of instantly jumping on and creating a RegEx to strip the <*> tags from the message - but then ...