Subscribe to Feed

Archive for the ‘Asp.Net’ Category

By default, Asp.Net specifies a limit for the input stream buffering threshold. This limit can be used to prevent denial of service attacks that are caused, for example by users posting large files to the server. The default value for this is 4096 kb. If the threshold is exceeded, you get a ConfigurationErrorsExeption with a [...]

Escaping XML text basically means we are trying to replace the “<”, “>” etc. characters that are used to construct the XML with the encoded values. Here are the 5 values that we care about

XML Value
Encoded Value

<
&lt;

>
&gt;


&quot;


&apos;

&
&amp;

There are several ways in which you can escape an XML file or string in .Net.
 
1. Using Regular [...]

If you are trying to troubleshoot problems occurred in you .Net application, especially if they are caused by ASP.net, you are now in luck. Microsoft recently released an extension for WinDbg that will allow you to diagnose high-memory issues, high-CPU issues, crashes, hangs and many other problems that might occur in a Asp.NET application. This [...]

It is very simple to get the name of the application pool current worker process is associated with in Asp.NET. You can simple use the server variables for that. For example, to display the app pool name on your web page you can simply use the below code snippet.
<%= Request.ServerVariables("APP_POOL_ID") %>
 
This is usually helpful when [...]

I just got this email from Microsoft. Hope this helps some one waiting to get certified for .Net Framework 4 Development. It seems slots are very limit, register asap.
You are invited to take part in one or more beta exams for Visual Studio 2010 and the Microsoft .NET Framework 4.
If you pass one of the [...]

You can use Microsoft.Web.Administration namespace to create a binding and set the certificate hash. Let us say you are trying to add a new binding to a website “MySite” with a new SSL certificate hash “MyCertHash”, here is what you have to do to achieve this
ServerManager serverManager = new ServerManager();
serverManager.Sites["MySite"].Bindings.Add("*.443:", MyCertHash, "MyCert");
The bindings member configures [...]

On some occasions you might want to deploy the Asp.Net MVC application to avoid compiling it yourself etc. You can achieve this by following the below steps

Create an ASP.NET website project in Visual Studio
Add a reference to the System.Web.Mvc.dll (and any other DLLs that your application might need)
Copy the web.config from regular ASP.NET MVC project [...]

On some occasions you might want to use retail versions of Asp.Net JavaScript libraries while debugging your code. (For starters, when in debug mode in Visual Studio, you are not using the release versions, instead you are using debug versions of the libraries). To achieve this all you have do is set the ScriptMode property [...]

On some occasions you would want to run some code for every change in the configuration file, like reload the cache etc.. A change in web.config prompts the app domain to reload. So one should be able to look for application domain shutdown reason to verify a configuration change. Here is how you do can [...]

On some occasions, you wish to initialize your Asp.net application even before it receives its first hit to get rid of any over heads like creating application domain, initializing the .net runtime environment etc.. To achieve this you can use aspnet_compiler to pre-compile ‘in-place’, so that in effect the application is primed. Compiling ‘in-place’ the [...]


 

 

Subscribe to Feed

Categories

Links

Dev Jobs