Refinance now before rates go up! Get multiple rate quotes at GetMyLender.com.
Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

ASP.NET Webdomain Recycles Automatically on Deletion of Sub-directory

While working on a web application, once upon a time I was presented some weird behavior on ASP.NET.

In ASP.Net web application, When you delete a directory the session gets expired automatically. This is one of the frustrating error. It is the default nature if you are deleting a sub-directory within your application, your app domain will restart. This removes all session data.

Following observations will help you to find base of this issue:
- Session times out randomly while working on the application.

How to Maintain Session in ASP.NET application after deletion of subdirectory

In ASP.Net web application, When you delete a directory the session gets expired automatically. This is one of the frustrating error. It is the default nature if you are deleting a subdirectory within your application, your app domain will restart. This removes all session data.

Why the asp.net worker process recycles which kills all the session variables in memory is due to dynamically deleting a folder under the root application folder.
ASP.NET runs a File Monitor (FCN) that observes any change to the structure of the Virtual Directory. In case of any change the application is recycled.

Difference between GET and POST Methods

In this article, we will discuss about difference between GET and POST Methods. So that it will usefull in your apllications.

GET Method ():

1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system.
4) Maximum data that can be sent is 256.

A potentially dangerous Request.Form value was detected from the client in asp.net

A few days ago, while working on an ASP.NET 4.0 Web project, I got following issue.

“A potentially dangerous Request.Form value was detected from the client…..”

This issue occurred when I tried to enters some non-encoded HTML content as a product details into the rich textbox.

e.g.: “<p>Hello</p>”

After enter the above html data in Rich Textbox and I tried to insert data then I got error message like

How To Add MIME Types In IIS7

Many times we used IIS7 (Internet Information Service) as a server for our web projects also while working with a audio, video, text files etc for web application, sometimes it will happened that our browser showing some errors that comes from server side. And audio/video files may not work (just like video not playing) and server gives error. If that error is understandable by us then its good but what to do if it is not understandable?

First of all I want to tell you, many times it is happened because file format/extension of audio/video file which we want to play on browser is not known to IIS. So video will not play and error will be shown like video/mp4 MIME type is not supported. Now, then what to do so that IIS knows file format ? or how we can see whether file format is configured on server or not? And if file format is not configured then how will you add that type to IIS?

List of MIME Types / Internet Media Types

What is a MIME type?

MIME stands for "Multipurpose Internet Mail Extensions. It's a way of identifying files on the Internet according to their nature and format. For example, using the "Content-type" header value defined in a HTTP response, the browser can open the file with the proper extension/plugin.

What is an Internet Media Type?

"Internet Media Type" is the same as a MIME type. MIME types were originally created for emails sent using the SMTP protocol. Nowadays, this standard is used in a lot of other protocols, hence the new naming convention "Internet Media Type".