Saturday, 28 February 2015

Maximum request length exceeded Error


If you are using IIS for hosting your application, then the default upload file size if 4MB. So, you may get this error(Maximum request length exceeded) if you try to upload a file above this size. To increase it, please use this below section in your web.config -

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="1048576" />
    </system.web>
</configuration>

For IIS7 and above, you also need to add the lines below:

 <system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
   </security>
 </system.webServer>


Note: maxAllowedContentLength is measured in bytes while maxRequestLength is measured in kilobytes, which is why the values differ in this config example. (Both are equivalent to 1 GB.)


Friday, 27 February 2015

Css Notification Boxes

Today we are going to look at the design of CSS Notification Boxes. Notification or Alert Boxes are a great way to inform the user of a variety of messages, such as: error messages, success messages, warning messages and general notification. A great example for using these notification boxes would be for user registrations for a website, if for example the user made an error during registration, you could use an alert box to inform the user of the particular error. If however everything was correct, you could alert the user that registration has succeeded and that they can now login.
In this tutorial, we are going to look at how to create a range of the most popular notification boxes, today we are going to focus on the following:
1. Error Box
2. Success Box
3. Warning Box
4. Notice Box
CSS Notification Boxes

Step 1:

First we will create the basic layout for each box.

.alert-box {
    color:#555;
    border-radius:10px;
    font-family:Tahoma,Geneva,Arial,sans-serif;font-size:11px;
    padding:10px 10px 10px 36px;
    margin:10px;
}

Lets take a look at each line:
color:#555; – This is used for the text color.
border-radius:10px; – We will give the borders a radius of 10px.
font-family:… – Is the name of the font that we will be using.
padding:10px 10px 10px 36px; – Padding inside the box, 10px for Top, Right and Bottom, 36px for Left.
margin:10px; – The margin around the box will be 10px.

Step 2:

In each box there will be a span property notifying the user of the alert.

.alert-box span {
    font-weight:bold;
    text-transform:uppercase;
}

Lets take a look at each line:
font-weight:bold; – All the text inside the span property will be bold.
text-transform:uppercase; – This will transform the text to uppercase.

Step 3:

Now lets add some color and icons to each box.

.error {
    background:#ffecec url('images/error.png') no-repeat 10px 50%;
    border:1px solid #f5aca6;
}
.success {
    background:#e9ffd9 url('images/success.png') no-repeat 10px 50%;
    border:1px solid #a6ca8a;
}
.warning {
    background:#fff8c4 url('images/warning.png') no-repeat 10px 50%;
    border:1px solid #f2c779;
}
.notice {
    background:#e3f7fc url('images/notice.png') no-repeat 10px 50%;
    border:1px solid #8ed9f6;
}

Lets take a look at each line:
background:… – Specifies the background color and the icon used for the alert
border:… – Specifies the border width, style and color.

Step 4:

Lastly we need some HTML code to display the alert boxes.


<div class="alert-box error"><span>error: </span>Write your error message here.</div>
<div class="alert-box success"><span>success: </span>Write your success message here.</div>
<div class="alert-box warning"><span>warning: </span>Write your warning message here.</div>
<div class="alert-box notice"><span>notice: </span>Write your notice message here.</div>

Wednesday, 25 February 2015

Types of Cloud


Based on deployment model

The deployment model tells you where the cloud is located and for what purpose. On the basis of deployment model following are the types of cloud:
  • Public 
  • Private
  • Community 
  • Hybrid

Based on Service Model

Service model describe the type of service that the service provider is offering. The best-known service models are:
  • Software as a Service
  • Platform as a Service
  • Infrastructure as a Service
This is also known as SPI model


What is cloud computing?


Cloud Computing refers to applications and services that run on distributed network using visualized resources and accessed by common Internet protocols and networking standards. In cloud computing, resources are virtual and limitless and details of the physical systems on which software runs are abstracted(hidden) from the user.


Sunday, 15 February 2015

Program that self replicates!

for (int i = 1; i <= 5; i++)
{
    string path= Application.ExecutablePath;
    exec = path.Insert(path.IndexOf("."), i.ToString());
    File.Copy(Application.ExecutablePath, path);
    Process.Start(path);
}

Write this code in Form_Load event , and it will replicate itself infinely.....

Saturday, 14 February 2015

General Knowledge Questions- Set 20


153. A microprogram written as string of 0's and 1's is a
symbolic microinstruction
binary microinstruction
symbolic microprogram
binary microprogram
154. Which command lists the contents of current directory of a disk
Copy
Tree
Cd
Dir
155. Which of the following file organization is most effieient for a file with a high degree of file activity?
sequential
ISAM
VSAM
B-Tree
156. A communications device that combines transmissions from several I/O devices into one line is a
concentrator
modifier
multiplexer
full-duplex line
157. Which command displays all the files having the same name but different extensions?
Dir filename.*
Dir filename.ext
Dir *.sys
Dir *.ext
158. Most data communications involving telegraph lines use:
simplex lines
wideband channel
narrowband channel
dialed service
159. Which of the following is not a transmission medium?
telephone lines
coaxial cables
modem
microwave systems