asp.net

ASP.Net Session Timeout detection: Is Session.IsNewSession and SessionCookie detection the best way to do this?

When my ASP.Net session times out (and forms authentication as well) and I try to hit a page, I am automatically redirected to my default login.aspx page. Before the page loads I need to determine whether this is a timeout situation and if so - redirect to timeout.aspx. The articles below specify that if IsNewSession is true, and a se...

Ninject on asp.net Session state

I'm working with Ninject on a web application, using the BasePage and BaseMaster from the frameworks's integrations. What I would like to do is have an object injected and have a new instance created on each session. I've looked at the OnePerRequest behavior and it's close, but not quite. What I'm doing is performing a lot of calculati...

Using Me (VB.NET) keyword is it required or not?

I'm currently working on a web application (ASP.NET) and some of the pages that are included were created by other programmers, what I noticed is, they are not using "Me(VB.NET)" keyword to access controls, while on my side I used it in every page that I've created. Just to give further information, the web application runs on a .NET Fra...

Default.aspx being served when debugging locally

Any ideas why the built in asp.net webserver insists on serving "/default.aspx" whenever you browse to the root "/"? Even if you force the global.asax to redirect to "/" whenever "/default.aspx" is detected it will see "/" as a request to "/default.aspx" and an infinite loop ensues! Anyone have a way around this behaviour? ...

CompositeScript - Invalid Viewstate error

I'm using the new CompositeScript feature that's available in the ASP.NET 3.5 SP1 for the ScriptManager. When I test this with the ASP.NET Development Server it works fine but when I publish the site to my IIS webserver the combined files cannot be downloaded, I always get the following error: Invalid ViewState. The querystring that i...

Sample Request: <msi> task of nant-contrib

Can anyone please provide me a sample build file demostrating the use of the task of nant-contrib for creating an installer of a web application project. ...

How close can you identify a user using asp.net and webservices

Hi The task is simple, and the answers might be many. But here goes: On my website I'll make an InfoAboutYou.aspx page. So far i got the IP and the browser name and version, but ill like to expand, with just about every thing i can look up about the curret user/ip and hes Browser/OS Does it exists any free webservices that kan lookup m...

IIS HttpModule unable to set Session

I am trying to set Session values using a IHttpModule. I have set the HttpModule to be used for all requests, not just managed/ASPX pages. I found however, that when a request for a non-ASP.NET page came in (such as gif) the Session member of the HttpApplication would throw an exception or be null. I found the following SO post for the...

.NET Framework weaknesses to be avoided

Dupe: http://stackoverflow.com/questions/411906/c-net-design-flaws#411919 When I learnt the .NET Framework, I was pleased with the direction Microsoft was/is taking with their application development vision. There was a great sense of enjoyment and excitement developing on the .NET platform, with some areas delivering truly impressive c...

Using event of control under datalist

I have a datalist control which some controls(ex: button) are in it. I want to write some code into click event of button which is in the datalist control. But in the code behind page I can't see the name of controls into datalist. How can I solve this problem? ...

Telerik UI controls vs client-side UI with jQuery

I am trying decide on how I want to handle the UI for an external-facing web app. Because it is external, latency caused by page bloat could be an issue. I have used jQuery some in the past, and I am evaluating the Telerik controls now. I have seen a lot of good recommendations on the Telerik controls, including some on StackOverflow. I...

What are your thoughts on this article about ViewState v.s Cache?

I was looking at this article from 2005 and wanted to get some thoughts on it, advantages and disadvantages that the article does not point out about ViewState and Cache? http://www.codersource.net/asp_net_viewstate_versus_data_caching.aspx ...

How would I determine on the server side if a given HttpRequest was sent via ajax?

I was wondering what is the best way (if at all possible) to determine on the server side if a given HttpRequest was sent via ajax? ...

Why am I losing the Session here?

I have a page with a button that when I click, it retrieves data from a database and stores it into a datatable and binds it to a GridView. This datatable is stored in a Session variable. I also have a button that exports specified columns from the datatable to an excel file, but when I click the export button a second time, I get the ...

ASP.NET output expense report in Excel

On this project I am working on right now, one of the newest feature requests is to output expense information which is stored into expense report that matches an Excel worksheet they already use for all of their expense reporting. I was curious if there was a way that I could take this excel worksheet (with all of its layout already d...

Managing complex Web.Config files between deployment environments.

Does anyone know of any good tools/utilities for managing Web.Config files between different build/deployment environments? For example, I have a WCF project that in development I don't want to enable SSL, but I do want it enabled in production. I want different logging settings, different DB connection strings, different error handlin...

Cache v.s Session

What is the difference between storing a datatable in Session v.s Cache? Advantages and Disadvantages? So if it is a simple search page which returns results in a datatable and binds to a gridview. If user a searches and user b searches, is it better to store it in Session since each user would most likely have different results or ca...

Possible to expose CONSTANTS defined in webservice to consuming client (.Net both sides)

I have several constant defined for a webservice, and I would like to make these available to consuming client. Both the server and client are .Net. I think it is possible to achieve this by using enum's, but many of my constants are text string with spaces, so I would have to write an extra function to convert the enum into the equiva...

Does the Cache get overwritten?

If yo have multiple users on your website on the same page and they are running queries (searches) and the results are stored in a datatable. Will the last person's search overwrite the application Cache if you store it in the Cache? Is this a reason to use Session? ...

Strange intermittent SQL connection error, fixes on reboot, comes back after 3-5 days (ASP.NET)

For some reason every 3-5 days our web app loses the ability to open a connection to the db with the following error, the strange thing is that all we have to do is reboot the container (it is a VPS) and it is restored to normal functionality. Then a few days later or so it happens again. Has anyone ever had such a problem? I have notice...