I'm using IIS 6 with EPiserver CMS which requires all requests to go through aspnet_isapi.dll.
I want to gzip all my static files (js, css mainly). Trying to setup compression in IIS didn't work.
Is there a setting in EPiServer that will allow me to achieve this?
Can .net framework compress files automatically?
...
I am looking for any best practices or ideas on how you would create an interface with a DB from a .NET web application to upload data from Excel files
Should I use a mechanism that allows all the records to be loaded and flags the errors or should I use a mechanism that stops the load when an error occurs.
I've never had to deal with t...
If I select many rows from one table with one instance of DataContext.
And then do I some changes in properties in the rows, can I submit changes to database only for one of the selected rows?
...
If you have to use String.Replace() to replace test 50 times, you essentially have to create a new string 50 times. Does StringBuilder.Replace() do this more efficiently? E.g., should I use a StringBuilder if I'm going to be replacing a lot of text, even while I won't be appending any data to it?
I'm using .NET, but I assume this woul...
Hypothetical situation: let's say I have a 3rd party .net assembly being used in the ASP.Net web system that I'm working on that just kinda crashes every now and then. When it does so, all calls to it throw exceptions until the system is rebooted. This is, obviously, a little sub-optimal.
Is there a way to reboot just that assembly fr...
Is there an API to access Subversion from C#?
...
I need to add localization to the exceptions thrown by my application as a lot are ApplicationExceptions and handled and logged to an error report. Ideally I want to create a new Exception, imheriting from ApplicationException that I can pass the resource key as well as arguments to, so that the exception messsage can be built up from t...
I want to get Visual Studio style tabs (you know, the ones where you can tab through the currently opened files).
Is there a 3rd party component that does this?
How hard would it be to do myself?
...
app.config configuration sections are nice, but I often need multiple configuration sets, but with small difference.
what I want is:
Have one section with default configuration (this one is created with the designer, and thus has the auto-generated strongly-typed accessors in the Settings class
Another section with only the "new" item...
Is there a way to convert from System.Windows.Forms.HtmlElement to mshtml.IHTMLElemenet3?
--edit after answer accepted --
This is what the code would look like.
HtmlElement myElement = getElementByID(id);
IHTMLElement3 h3 = (IHTMLElement3) myElement.DomElement;
Thanks @korchev
...
How much code documentation in your .NET source is too much?
Some background: I inherited a large codebase that I've talked about in some of the other questions I've posted here on SO. One of the "features" of this codebase is a God Class, a single static class with >3000 lines of code encompassing several dozen static methods. It's eve...
Does anyone have a suggestions as to the best way to allow users to select which columns appear in a datagrid? I would like them to be able to set this up. It would be stored with the user in a profile and loaded each time the user loads the grid. I was thinking about something with ASP.NET personalization.
...
If I create a UserControl and add some objects to it, how can I grab the HTML it would render?
ex.
UserControl myControl = new UserControl();
myControl.Controls.Add(new TextBox());
// ...something happens
return strHTMLofControl;
I'd like to just convert a newly built UserControl to a string of HTML.
Answered (below):
Using azams...
Sorry if the title is awkward, but I can't think of a better summary.
Here is what I am trying to do:
Given a date, a day of a week and an integer n, is the date the nth day of the month?
For example:
input of 1/1/2009,Monday,2
would be false because 1/1/2009 is not the second Monday
input of
11/13/2008,Thursday,2
would return true ...
I have the following structure:
<StructLayout(LayoutKind.Sequential)> _
Public Structure _WTS_CLIENT_ADDRESS
Public AddressFamily As Integer
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=20)> _
Public Address() As Byte
End Structure
Which is populated by the following call:
Dim _ClientIPA...
I have a form that excepts a file upload in ASP.NET. I need to increase the max upload size to above the 4 MB default.
I have found in certain places referencing the below code at msdn.
[ConfigurationPropertyAttribute("maxRequestLength", DefaultValue = )]
None of the references actually describe how to use it, and I have tried sever...
Hi,
I'm looking for a component for C#.NET 2008 Professional that is capable of doing the majority of the network communications work that is required of our application so our programmers don't have to.
This component should function similarly to the way RealThinClient (RTC) does. The component must be able to gracefully lose and reg...
For instance, would the compiler know to translate
string s = "test " + "this " +
"function";
to
string s = "test this function";
and thus avoid the performance hit with the string concatenation?
...
I want to access remote server using my program (C# .NET) and execute there a program in the context of connected user, just like using Remote Desktop.
I don't want just run a program using some user account(like RunAs), but to have a separate execution session like Remote Desktop
I guess terminal services should be used somehow, but I...
I saw another question like this but it did not answer my question. I am using .Net framework 2.0 / jQuery to make an Ajax call to a 2.0 web service. No matter what I set the contentType to in the ajax call, the service always returns XML. I want it to return Json!
Here is the call:
$(document).ready(function() {
$.ajax(...