asp.net

does IIS 7 treat ASP.NET errors differently than wcf errors?

when ASP.NET throws an application error, IIS shows the 500 HTML error, but when a WCF service throws a FaultException (IIS 500), the client gets a proper SOAP fault with error message in it. Is there any good documentation on this request processing? ...

iSeries + ASP.NET web application - Do I need any special license for iSeries?

I know how to access the iSeries using VB.NET. I use an OLE DB connection to connect to it. Now I am developing an ASP.NET web application using VB.NET that is going to use the iSeries for the database. Is there any special web license I need to access the iSeries over the web in this fashion? It's really just the web server accessing th...

asp.net OnPreRender doesn't fire after a Redirect in IE

When I run the following logic: 1) from Page1.aspx Response.Redirect("Page2.aspx?Params...") 2) from Page2.aspx Page_Load event Response.Redirect("Page1.aspx") The Page1 OnPreRender event does not fire if the browser is IE8. Its ok with Firefox. It seems that the browser is loading a cached version of the page. Any idea how to f...

C# GridView On Edit Error

Here is my GridView: <div> <asp:GridView ID="MainGridView" runat="server" AllowPaging="True" DataSourceID="GridViewDataSource" EnableModelValidation="True" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" onpageindexchanging="MainGridView_PageIndexChanging"> <Columns> <asp:CommandField ButtonTyp...

How can I easily publish a ASP.NET web app using VS2010 on computer to a VM at work?

The old school way is to copy and paste and the files.. so we don't want that anymore.. So I notice VS2010 has 'Publish'... Should I use file system and just create a shared drive on the VM and publish that way?? Should I FTP and set up FTP on the VM FTP server? Should I use web deploy?? But that seems to be made for commercial web host...

sql 2005 xml passed to asp.net grid with date formating

i have sql that uses FOR XM RAW to generate xml for my asp.net application to use to bind grids to and things like this. the problem is that the date data is not taking the gridView formatting of the date because (and im taking a crack at this) the date value in the xml is a string and the formatting is not taking. any thoughts on how ...

Store files in ASP.net website, then download to browser

I'm creating an Excel file in C# on my asp.net web site. Then, I want to save this file somewhere within the web server's files, and send that file to the browser for the user to download. I've got it working on my local system in the dev environment, but I'm not getting the file addressing right. How can I store a file in "~\Paren...

Silverlight 3 or 4 multiple file upload and resize control

Where can I find a silverlight 3 or 4 user control that contains multiple file upload and resize capability? UPDATE: This will be used for uploading images. We'd like to resize the images prior to posting up to the server. ...

Asp.NET MVC is REST but Why Asp.NET WebForms are not?

Okay I hear that thing all the time on internet when reading an article about MVC : "Since Asp.NET MVC is REST, it is easy to consume ... etc." I've never heard such a thing for Asp.NET Webforms and it makes me wonder what makes something REST. As I understood, REST means Representational State Transfer in which what a user see on their...

ASP.NET Life-cycle Dichotomy: Dynamically Added Controls and Events

The situation: I have user controls with buttons that have hooked events. Controls with events need to be initialized in Page_Load or earlier. I wish to spawn these user controls dynamically by clicking an Add button. It is important to remember that events, such as click events, are not fired until just before Page_LoadComplete. Br...

Export Excel from web, what's the BEST way?

About 3 years ago, I was looking for a way to allow a web app user to download table results to an Excel file. I knew that I didn't want to put Office on the web server and that I probably wanted to create the XLS file in XML format. The question was: what was the best way? Now I am writing my resume and I am trying to recap the things ...

Read an excel uploaded through FileUpload

I have an ASP.NET web application that has a fileupload control to allow users to upload an excel file for it to read. I'm using an OleDBConnection and I feel like my connection string or querystring is wrong since the app keeps throwing OleDBExceptions at me (ouch!). What would be a good way to save or access the uploaded files? Here...

How to preserve ampersand in URL's querystring when using RegisterClientScriptInclude?

I have the need to add a javascript include to my ASP.NET page. The url of the javascript file has two key/value pairs in the query string. But the ampersand is being escaped and I don't want that. Page.ClientScript.RegisterClientScriptInclude("myKey", "https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&amp;s=1") This r...

How to protect my self-hosted website/system?

I am currently creating a .NET based (website/system) solution for small IT companies and I am offering it in a self-hosted package, which means my clients are going to mainly install it on their own servers. How do I make sure my system is not being run except on one server per client and no body is illegally-copying it to other server...

ASP.net: Crystal Reports - Subreport over multiple pages

I have a Crystal Report that has a header and a subreport with the height locked at a exact amount so the subreport will display a maximum of 20 rows on the page. However, this limitation has restricted the use of the system, and the users now require an unlimited number of rows in the subreport. I wish to keep the same layout as the r...

Window application or windows service?

I want to create a popup application that will run against my sql database and Fire a popup everymorning at the user machine to ask a question. the response will be send back to the Database. Prety easy with Windows service BUT not with a POpup or Interface. How can i accomplish this? Thanks for any suggestion ...

How to dynamically give customized text/naming conventions to dynamically generated labels/checkboxes?

I am trying to give names to my dynamically generated checkboxes through a for loop an algorithm. Coming up with the algorithm was pretty simple but I am unable to give them name/checkbox text. The best I could come up with was a similar checkbox text for everything that was generated. Is there a way to name them? Below is the code I ca...

IIS6 MVC2 Server starts sending out 404 after a while

I have a W2k3 server running IIS6 and MVC2 (.net 4). Right after the iis starts, everything works ok, the site runs fine. Extensionless urls work ok. After a certain period of time (maybe of inactivity) the server stops working and starts to send 404 errors to the client. As soon as I restart de application pool, everithing goes back ...

Silverlight passing data to aspx page

I want to send data from my silverlight application to a aspx page. But i don't want to pass parameter in the url when calling the aspx page. So i figure the best way is to do a POST. But i'm not too sure how to do it.. Those anybody know. ...

How to get value in html control on postback in asp.net

I have an html control (not a server control) like textarea. How can I get the value in this control from the server side when I cause a postback by clicking on a button, without writing the value in the url. ...