What is the primary role of IIS in ASP.NET applications?
A. To compile code
B. To serve as a web server
C. To debug applications
D. To handle database requests
Answer: B
Which tool is used to configure IIS settings for ASP.NET applications?
A. IIS Manager
B. Visual Studio
C. PowerShell
D. Azure CLI
Answer: A
Which module in IIS handles ASP.NET Core applications?
A. HTTP Redirect
B. ASP.NET Core Module (ANCM)
C. Application Pool
D. FastCGI
Answer: B
Which of the following is required to run ASP.NET Core applications on IIS?
A. .NET Core Runtime
B. Windows Authentication
C. WebSockets
D. FTP
Answer: A
How do you restart IIS from the command line?
A. iisreset
B. iisstart
C. iisrestart
D. dotnet iisreset
Answer: A
What is the purpose of an application pool in IIS?
A. To group websites under a single application
B. To isolate applications for better security and performance
C. To store static files
D. To manage caching
Answer: B
Which of the following can be set at the application pool level in IIS?
A. Authentication methods
B. .NET Framework version
C. Database connections
D. SSL certificates
Answer: B
Which IIS feature allows secure communication over HTTPS?
A. IP Filtering
B. SSL Certificates
C. URL Rewrite
D. Application Pools
Answer: B
How can you configure a custom error page in IIS for an ASP.NET application?
A. Modify appsettings.json
B. Use the Error Pages feature in IIS Manager
C. Add a directive in Program.cs
D. Update the IIS App Pool settings
Answer: B
What is the default HTTP port used by IIS?
A. 8080
B. 5000
C. 443
D. 80
Answer: D
Which IIS feature helps redirect HTTP traffic to HTTPS?
A. URL Rewrite
B. Request Filtering
C. SSL Certificates
D. IP Restrictions
Answer: A
What is the default application pool identity in IIS?
A. LocalSystem
B. ApplicationPoolIdentity
C. NetworkService
D. LocalService
Answer: B
Which tool can be used to automate the deployment of ASP.NET apps to IIS?
A. MSDeploy
B. Docker
C. PowerShell
D. Azure Pipelines
Answer: A
How can you limit the number of concurrent requests in IIS for an ASP.NET application?
A. Configure request filtering
B. Modify application pool settings
C. Set the maxRequestLength
in web.config
D. Adjust worker process settings
Answer: B
Which IIS feature is used to load balance ASP.NET applications?
A. Application Request Routing (ARR)
B. IP Filtering
C. SSL Settings
D. FTP Publishing
Answer: A
What is the purpose of the web.config
file in an ASP.NET application hosted on IIS?
A. To configure application pool settings
B. To manage application-specific configuration, such as authentication and custom error pages
C. To handle database connections
D. To configure IIS logging
Answer: B
Which PowerShell cmdlet is used to install IIS on a Windows server?
A. Install-IIS
B. Add-WindowsFeature
C. Install-WindowsFeature -Name Web-Server
D. Enable-WebServer
Answer: C
How do you enable detailed error messages in IIS for an ASP.NET application?
A. Modify the appsettings.json
B. Enable Detailed Errors
in IIS Manager
C. Edit Program.cs
D. Adjust application pool settings
Answer: B
What is the function of the HTTP Redirect feature in IIS?
A. To forward HTTP requests to another URL
B. To block certain IP addresses
C. To handle database connection errors
D. To compress HTTP responses
Answer: A
Which of the following is NOT an IIS authentication method?
A. Forms Authentication
B. Basic Authentication
C. Windows Authentication
D. OAuth Authentication
Answer: D
What is the primary use of the Application Initialization module in IIS?
A. To pre-load an ASP.NET application to reduce cold start times
B. To restart the application pool
C. To configure SSL settings
D. To manage worker processes
Answer: A
How can you enable WebSockets for an ASP.NET Core app in IIS?
A. Use WebSocket Module in IIS
B. Add WebSocket configuration in appsettings.json
C. Enable the WebSockets feature in Windows Features
D. Modify Program.cs
Answer: C
Which protocol is used by IIS to serve ASP.NET applications over HTTPS?
A. TCP
B. FTP
C. SSL/TLS
D. UDP
Answer: C
What does the “Recycle” option in IIS Manager do for an application pool?
A. Stops the application permanently
B. Restarts the worker process to free up resources
C. Clears the app’s cache
D. Deletes temporary files
Answer: B
How can you configure request limits (e.g., request size) in IIS for an ASP.NET application?
A. Modify the maxRequestLength
setting in web.config
B. Use the Application Pool settings
C. Update the appsettings.json file
D. Set the limit in Program.cs
Answer: A
Which of the following can be used to protect an ASP.NET application from DDoS attacks in IIS?
A. IP and Domain Restrictions
B. Application Pool Recycling
C. SSL Certificates
D. FTP Settings
Answer: A
What is the role of the worker process (w3wp.exe
) in IIS?
A. It serves as the runtime engine for ASP.NET applications
B. It handles database connections
C. It manages IIS logs
D. It serves static files
Answer: A
How do you enable directory browsing in IIS for an ASP.NET application?
A. Enable the Directory Browsing feature in IIS Manager
B. Modify the Program.cs
file
C. Set the EnableDirectoryBrowsing
flag in appsettings.json
D. Add a new application pool
Answer: A
Which of the following commands is used to stop a website in IIS?
A. iisreset /stop
B. Stop-Website
C. Disable-IIS
D. Stop-WebApp
Answer: B
What is the purpose of application pool recycling in IIS?
A. To serve cached responses
B. To refresh worker processes and free up memory
C. To restart the application server
D. To manage network requests
Answer: B
How can you secure an ASP.NET application on IIS with IP restrictions?
A. Use IP and Domain Restrictions feature in IIS Manager
B. Modify appsettings.json
C. Update the Application Pool settings
D. Add a reverse proxy
Answer: A
What is the purpose of the IIS URL Rewrite module?
A. To manage SSL certificates
B. To modify request URLs based on predefined rules
C. To filter IP addresses
D. To handle authentication
Answer: B
Which command is used to reset all IIS services?
A. iisreset
B. iisreset /reset
C. Restart-IIS
D. dotnet iisreset
Answer: A
What is the function of the Application Pool Idle Timeout setting in IIS?
A. It defines the time period an app can remain idle before being unloaded
B. It controls how long requests can take
C. It manages SSL sessions
D. It sets limits for worker process memory usage
Answer: A
Which IIS module is responsible for caching frequently requested content?
A. Output Caching
B. Application Pool
C. URL Rewrite
D. WebSocket
Answer: A
How can you restrict the upload size for files in an ASP.NET application running on IIS?
A. Modify the maxAllowedContentLength
in web.config
B. Set a limit in IIS Manager
C. Update the Application Pool settings
D. Configure Program.cs
Answer: A
What is the default recycling interval for an application pool in IIS?
A. 10 minutes
B. 1740 minutes (29 hours)
C. 24 hours
D. 60 minutes
Answer: B
What does the HTTP Request Filtering feature do in IIS?
A. It filters requests based on size, extensions, and methods
B. It handles SSL certificates
C. It modifies request headers
D. It controls the caching of web pages
Answer: A
How can you view detailed IIS logs for an ASP.NET application?
A. Use IIS Manager under Logging
B. Modify Program.cs
C. Access appsettings.json
D. Enable logs in Visual Studio
Answer: A
How do you configure an IIS site to run under a specific application pool?
A. Assign the application pool in the site’s Advanced Settings
B. Modify the Program.cs
C. Set it in web.config
D. Use PowerShell
Answer: A
Which version of IIS introduced support for ASP.NET Core applications?
A. IIS 8
B. IIS 10
C. IIS 7
D. IIS 9
Answer: B
What is the function of the CGI module in IIS?
A. To run scripts using Common Gateway Interface
B. To manage application pools
C. To handle static file requests
D. To manage SSL settings
Answer: A
Which of the following helps in managing shared configurations across IIS servers?
A. Web Farm Framework
B. URL Rewrite
C. IP Filtering
D. FTP Publishing
Answer: A
How do you add a new MIME type for a site in IIS?
A. Use the MIME Types feature in IIS Manager
B. Modify web.config
C. Edit the appsettings.json
D. Use PowerShell
Answer: A