asp.net

ashx handler post issue

I'm getting some confusing results around myCustom.ashx handler. If i visit the handler via the browser: Token.Instance.User.UserId = 162 // which is correct If i post to the handler: Token.Instance.User.UserId = 163 // a new user is generated. It's seems like when i post it creates a new session. extra info: public class myCus...

FormCollection Empty on Form Post in ASP.NET-MVC

I am posting a very simple form using a method I have used frequently in the past. It may be easier to show my code rather than type a lengthy explanation. Here's the HTML: <% Html.BeginForm("CreateMarketingType", "ListMaintenance"); %> <div id="ListMaintenanceContainer"> <table> <tr> <th>Marketin...

Book for getting started with ASP.NET?

I have a profound knowledge of the .NET framework - except ASP.NET. What would be a good book for getting started with ASP.NET that maybe also covers the latest buzz like ASP.NET AJAX and ASP.NET MVC? ...

Database Deployment Strategies (SQL Server)

I am looking for a way to do daily deployments and keep the database scripts in line with releases. Currently, we have a fairly decent way of deploying our source, we have unit code coverage, Continuous integration and rollback procedures. The problem is keeping the DB scripts in line with a release. Everyone seems to try the script ou...

Refresh A Image Src...

k... Strager was able to help me a bit. However, it's still not working quite right. Need someone that knows both MVC and jQuery please... I have a page that has a image that when clicked on will launch a dialog box that gives the ability to upload a file. Once the dialog closes the image is supposed to refresh with what was uploaded/st...

Inject record in SqlDataSource

Hello, I would like suggestions on how to inject a record into my DropdownList to give an "All" option. Here is my code, data coming from the Northwind database. <asp:DropDownList ID="ddlRegion" runat="server" DataSourceID="SqlDataSource1" DataTextField="RegionDescription" DataValueField="RegionID" AutoPostBack="True" ons...

asp.net gridview is fetching data too long

Hi, it seems common issue so I am surprised I didn't find solution already, maybe someone can help me out. I have a gridview that displays list of users of the app, this list is very big, and takes forever to load the data. Otherwise, data is paged through and once loaded everything goes fine. To help admins, I made search box and that w...

Hashtable insert failed. Load factor too high. - ASP.NET 2.0

I received the following error while trying to login to a secured directory. As far as I know there are no large hashtables in use. The user login information is in the web.config file. Notice this is happening in .NET 2.0. I've searched and found references to this occurring in .net 1.0 or 1.1 environments but I haven't found a solution...

How do I disable all controls in ASP.NET page?

I have multiple dropdownlist in a page and would like to disable all if user selects a checkbox which reads disable all. So far I have this code and it is not working. Any suggestions? foreach (Control c in this.Page.Controls) { if (c is DropDownList) ((DropDownList)(c)).Enabled = false; } ...

Inject record into DataList

Hello, I would like suggestions on how to inject a record into my DataList to give an "All" option. Here is my code, data coming from the Northwind database. <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" RepeatLayout="Flow" ShowFooter="False" ShowHeader="False" RepeatDirection="Horizontal" ...

What Happened to Handlers (ASHX) in ASP.NET 3.5

Why does the default "generic handler" code in an ASP.NET 3.5 web application add attributes to the class but not the correct namespace references. This is the template they give you out-of-the-box: using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Handler1 { /// <summary> /// Summar...

How do I combine WebResource.axd and ScriptResource.axd files so as to result in less requests to my ASP.NET server?

On a site I'm working on, the pages are generating 45 external WebResource.axd and ScriptResource.axd files so the broswers have to request all 45 references. That's a lot of references so I'd like to know if there is a way that all of those requests could be combined into one request? I've seen that the Script Manager is supposed to be ...

JSON is used only for JavaScript?

I am storing a JSON string in the database that represents a set of properties. In the code behind, I export it and use it for some custom logic. Essentially, I am using it only as a storage mechanism. I understand XML is better suited for this but I read that JSON is faster and preferred. Is it a good practice to use JSON if the intent...

How did you get ASP.NET to output UTF-16 encoded text?

How did you get ASP.NET to output UTF-16 encoded text? I serialize an object in .NET which by default is UTF-16 format. Now I want to send the string as an output response to an .ashx request. I get the error: Switch from current encoding to specified encoding not supported. Error processing resource How do I tell my website or page t...

Windows Sharepoint Services (WSS) and Forms Authentication - Passing those credentials to other ASP.NET Forms Authentication Apps

Sorry for the poor title here :) I have my WSS configured for Forms Authentication. I'd like my users to land on the WSS login page, log in, and then provide them links to other ASP.NET apps which also are configured for forms authentication. I'd like to achieve a single-signon-ish solution (the reason I say "ish" is I'm not looking ...

Out of Memory Exception

Hello, I am working on a web app using C# and asp.net I have been receiving an out of memory exception. What the app does is read a bunch of records(products) from a data source, could be hundreds/thousands, processes those records through settings in a wizard and then updates a different data source with the processes product informati...

DefaultCredentials in Accessing CRM / Sharepoint Web Services

Hi everyone, I made an application that access CRM's web service. The problem is, when I deployed the dll into Sharepoint server, it returned error 401 unauthorized. Apparently the System.Net.CredentialCache.DefaultCredentials didn't work (my suspicion). Here's the code. CrmSdk.CrmAuthenticationToken token = new CrmSdk.CrmAuthenticatio...

invite attendees to public calendar event in exchange web services

Obviously in outlook, one is able to create an appointment in a public folder and invite people (including yourself) - i want to replicate this with exchange web services. i can create an event in my own calendar and invite people and that works fine. if i create an event in a public folder and invite people, in the createitem object th...

Connecting ASP.Net to Wcf/Tcp chat service

I have a WCF chat service that accepts duplex tcp connections. A single duplex tcp connection can be used to send and receive messages for more than one user (so I can have multiple chat servers that all connect to each other). Now I want to add Web users into the mix, to let them chat with the desktop users. This is for a live-support ...

UrlRewriter+HttpModule+Session problem

I need to write a custom "UrlRewriter" using a HttpModule, in the moment of "rewriting" I need access to the Session and has followed the advice from another SO thread: http://stackoverflow.com/questions/276355/can-i-access-session-state-from-an-httpmodule Everything works, except the RewritePath/Redirect part. I don't get any exceptio...