asp.net

How to execute server side code just before the asp.net session variable expires?

Hi, In my asp.net website I am creating a session upon user login and I would like to perform some operations in the database just before this session will expire.I am having problem in determining where should I write code and how will I know the session is going to expire. I am not sure if 'session_end' event of 'Global.asax' suits my...

Change textbox text in JavaScript

Hi all, I'm allowing a user to use either one of two textboxes to search a database - one is an ID field, and one is a freetext field. I'm using ASP.NET with C# btw. Anyway, all I need to do is have it so when a user clicks on one of the text boxes, the other text box text is simply deleted, so the other text box is blank. How would I...

asp.net ffmpeg video encoding hangs

I have below methods to encode videos uploaded to a web site with ffmpeg. It works fine for videos up to 8-9 MB but, if video size is larger than 8-9 MB it hangs web site. Only way to recover it is restarting iis. When i watch the process i can see that ffmpeg encodes video and exits. Resulted video is just fine. Problem starts as soon ...

Make a C# call from XML or just set path as application path in XML

Hey I'm connecting to a .sdf database file and i need it to be generic project wide, no matter what computer the project is on. Currently I cana cheive this in C#/ASP.NET witht he following code: "Data Source=" + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "/dbmon.sdf;Passwor...

Please help me choosing the language and framework for my undergraduate project.

I am a final year computer science student from Mumbai University, India. The topic of our undergraduate project is SOA. Under this project we are supposed to build 3 service components and one example website that uses those components. I am quite good with Java and have no experience whatsoever with C# or .NET. I am having hard time ...

REST uri for POST and return(GET)

Sorry for the strange title. Here is my situation. I have a table of products with the name and display order of each product. The client can change the display order of the products. The table is generated using jQuery.tmpl and the data is pulled using GET under WCF. The products pulled from the db are by CategoryID. When the user...

ASP.Net output caching annoyance

In our ASP.Net site we only allow users in from certain countries by checking and filtering their IP address by range. One of the features of the site is we have a bypass IP check query string argument. This argument just sets a bypass cookie in case they click other links beyond the initial landing page which we can check to keep the by...

c#: crawler project

Hi, Could I get very easy to follow code examples on the following: Use browser control to launch request to a target website. Capture the response from the target website. convert response into DOM object. Iterate through DOM object and capture things like "FirstName" "LastName" etc if they are part of response. thanks ...

ViewState, QueryStrings and their effect on SEO

Well, to start with, I'm a novice ASP.Net/C# programmer, and had an experience only of a couple of projects during college and a couple of freelancing projects when I was recruited by a startup company to build their ASP.Net based website. I've just abut completed the website, and now since the company is not able to find a worthy enough...

Javascript store not removing all elements before re-adding

So I have a dropdown setup on the page called ddlVehicleType that is populated from a store. This method gets called when another dropdown is changed, and it's supposed to remove all items from the aforementioned store, re-add them as needed, and then populate the dropdown with the new values. It's doing everything it's supposed to EXCE...

maxRequestPathLength not in ASP.NET 4 documentation and doesn't work

If I try to use the new maxRequestPathLength settings in an ASP.NET application it does not work. I get an unrecognized attribute error. I've tried using both ASP.NET Integrated and Classic application pools in IIS 7. What is also funny is that if you search for maxRequestPathLength on MSDN it is no where to be found in the documentat...

Webresource.axd doesn't load on my asp.net application running on my web farm

I'm working on an ASP.net web application. I'm getting errors on some of my pages where I get runtime JavaScript errors. I've narrowed the problem down to a single ASP Menu control on the master page. I created a blank page with just the ASP Menu control. The ASP Menu control is bound to Web.sitemap. The page intermittently gives ru...

ASP.NET MVC DDD E-commerce - Admin and front separation

Hello, I'm going to write an ASP.NET MVC 2 application using Domain Driven Design. I'm trying to figure out how to separate the Admin from the store front. I could create 2 MVC projects, but regarding the services for them, should they be in separate projects as well or could I use the CatalogManager, for example, for both, Admin and the...

Default column sorting from datagrid

I have 5 bound columns to be retrieved from the database but I want that on page load event the retrieval of data should be sorted according to that column only, What I need to do..plz help me!! ...

call stack missing info on mono with apache and mod_mono

How do i enable debugging/stacktrace with filenames and numbers with apache2/mod_mono? Instead of filenames and numbers i get something like this at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 I tried using MonoDebug true in apache and recompile mod_mono with --enable...

SelectMethod in objectDatasource getting called multiple times with multiple datapagerfield

Hi all, Ok, so here is the setup. I am building a page that has a listview, a datapager, and 3 datapagerfield (2 x NextPreviousPagerField, 1 x NumericPagerField), and a objectdatasource to tide all of this together. It was all working fine until I put a breakpoint into the SelectMethod specified in the objectdatsource control. It see...

Lightweight asp.net membership provider alternative

Looking for a light weight alternative to the membership provider. Does such a thing exist? It should allow for the creation and modification of accounts, nothing to fancy. A password reset would also be nice. Would be great if it didn't require a database but used some object database (couchdb, db40 etc). Basically as I wrote, a simple...

Urls get corrupted with Outputcache when folder changed

I noticed serious bug with outputcache on user control level. Code is as simple as <a runat="server" href="~/App/View/Login.aspx">Login</a> When first page domain.com/App/View/login.aspx all is fine and I see getting link like domain.com/App/View/Login.aspx In output I see following HTML: <a href="Login.aspx">Login</a> But then...

list of all available server controls

Just as the title states, can anyone point me to a list of all available asp.net server controls (preferably with descriptions)? I would have thought that something like this would be readily available but I've had no luck finding this. I almost always have to dig around to find a control to solve a particular problem, a quick referenc...

ASP.NET/IIS6 - Disable chunked encoding when using dynamically compressed content?

I'm running ASP.NET on an IIS6 server. Right now the server is set up to compress dynamically generated content, mainly to reduce the page size of ASPX files that are being retrieved. Once of the ASPX files has the following bit of code, used to fetch a file from the database and send it to the user: Response.Clear(); Response.Buffer ...