I have a big problem. There are devices in live that send the URL "/updates ". It's a typo of the developer for those devices. In the server logs, it looks like "/updates+".
I have a ManageURL rewriting module that handles all requests without extension. But this request causes an HttpException:
System.Web.HttpException:
System.Web...
I'm using stock Asp.net membership with built in Login controls, etc. Problem is that the confirmation email that is send by registering has a body that is blank. It should have a link in it that the user clicks on to confirm their email and register. The email does send and is delivered ok except the blank body. Anyone know what I'm doi...
I have to show how many people are online in that site. The site has developed by using ASP.NET 2.0. Currently I am using the Session start (increase by 1) and Session End Event (decrease by 1) in Global.asax. But the Session_End Event not calling properly most of the times. Is there any better way to achieve this?
...
Is there a way to url encode the entire URL querystring without trying to urlencode each individual querystring parameters. Right now I'm having to rebuild the querystring with something like this:
foreach (string x in Page.Request.QueryString.Keys)
{
sQueryString += x + "=" + Server.UrlEncode(Request.Params.Get(x)) + "&";
}
...
Was wondering what you thought of this solution, if this is right way to pass an error message to a custom page?
In web.config:
<customErrors mode="On" defaultRedirect="~/Error.aspx"></customErrors>
In Global.asax:
<script RunAt="server">
void Application_Error(object sender, EventArgs e)
{
Exception ex = Server.GetLast...
I've just started working on a brownfield ASP.NET 2.0 Web Application. As with a lot of brownfield applications, the architecture, and specifically the exception logging architecture, is inconsistent and in some places, missing or incorrect (swallowing exceptions, re-throwing, using them for control logic etc)
As a starting point for br...
I have a class that has the following properties:
public class Author {
public string FirstName { get; set; }
public string LastName { get; set; }
}
Next, I have a List of Authors like so:
List<Author> authors = new List<Author> ();
authors.add(
new Author {
FirstName = "Steven",
LastName = "King"
});
authors.add(
...
I have been trying to use declarative data bound ASP.NET, and struggling with the "magic" that goes on behind the scenes.
How do I do get this to work in ASP.Net 2.0. This is inside a data bound FormView control.
<asp:Label ID="RecipientsLabel" runat="server"
Text='<%# String.Join("; ", Eval("HtmlEncodedRecipients")) %>'>
</asp:L...
I have a web page with an editable DetailsView. After it is (successfully) edited, I need to use some of the edited fields to update some other tables in the database (in the code behind). I tried to use the DetailsView.DetailItem in the DetailsView_ItemUpdated event code, but the DetailItem isn't available any more - it is null. What...
I'm working on replacing an existing web grid in an ASP.NET web application, with a new implementation. The existing grid is powerful, but not flexible enough. It also brings with it all kind of frameworks we don't like to have on our web pages.
While looking into existing options I noticed I can break the available solutions into two m...
I use the Application_Error event to catch and log errors in my app. The Error is logged, then a friendly error screen is displayed:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As New Exception( _
String.Format("Error on page: '{0}'.", HttpContext.Current.Request.Url), _
Ser...
The title pretty much says it. I've written a web control (a header) that is going into our common library, but it references a javascript file and a css file. It works fine the first time, but when I refresh the page it looses that reference because the control didn't get rendered again so it didn't put the references out there. Is ther...
With a GridView control in .NET is there any way to change the Select option in a GridView to a Checkbox, how do you select multiple rows?
I tried adding a CheckBoxField into my GridView but when I ran it it didn't show up.
...
One of the interesting things about Twitter is the over capacity, fail whale. My question is, programmatically, how can they detect when their system is over capacity? Is there a special type of exception that gets thrown in this case?
...
I asked this question earlier but I think I phrased it incorrectly, so here is attempt number two. I have the following code:
public User EditUser(User userToEdit)
{
//userToEdit contains values for eagerly loaded contacts entity
User originalUser = (from u in _entities.UserSet.Include("contacts")
...
I have notice that stackoverflow.com does not have file extensions on their pages. How would I do this with an aspx web site?
...
Here's my scenario:
A desktop application posts to a specific ASP page in my web application with XML data. The web application is being re-written to ASP.Net; however, the Url for that specific page can not change (due to the desktop application).
My original idea was to simply 'forward' the requests from the classic ASP page to a ne...
Hello,
I'm making an ASP.NET MVC website and I have a certain group of forms that are related (let's called them Foo). My first attempt to organized them was to have this structure:
Controllers/FooController.cs
...and to have routes like this:
Foo/{type}/{action}/{id}
Unfortunately, since there are about 8 Foo sub-types, the FooC...
I have looked around, but I have been unable to figure this out, some languages are read and written from right to left, instead of left to right. It seems like a no-brainer to be able to get the text direction from the CultureInfo object somehow, but I have not seen it anywhere. Am I missing something?
...
Not being into ASP.NET world too much, I still faced a neccessity to work on ASP.NET project that requires periodic deployment of new version to production IIS server.
What are generally accepted best practices for ASP.NET application deployment?
Environment: Windows Server 2003, IIS6, MySQL5, ASP.NET 2.0 application.
...