EzDevInfo.com

iis interview questions

Top iis frequently asked interview questions

How to set .net Framework 4.5 version in IIS 7 application pool

I installed the Visual Studio 11 Beta and suddenly all the async action methods I had created under the VS 11 Developer preview started hanging (apparently this issue: http://blogs.msdn.com/b/pfxteam/archive/2012/03/03/10277166.aspx).

My app is using v4.0.30319 as the Framework Version, but there is no option to use 4.5. I repaired my .net 4.5 install to be sure, but nothing. Is there a way to configure this in IIS? Do I need to bin deploy the files (and if so which)?


Source: (StackOverflow)

How can I get my webapp's base URL in ASP.NET MVC?

How can I quickly determine what the root URL is for my ASP.NET MVC application? I.e., if IIS is set to serve my application at http://example.com/foo/bar, then I'd like to be able to get that URL in a reliable way that doesn't involve getting the current URL from the request and chopping it up in some fragile way that breaks if I re-route my action.

The reason that I need the base URL is that this web application calls another one that needs the root to the caller web application for callback purposes.


Source: (StackOverflow)

Advertisements

The breakpoint will not currently be hit. No symbols have been loaded for this document

Ok, what i have:

Visual Studio 2010 RC, W7 x64, started a new project type of Silverlight application. Hosting the Silverlight application in a ASP.NET Web Application Project. Silverlight Version 3.0. Added a LinqToSQL Class, a WCF Service, a Winform Tester Application (Project in the Solution) and a few Classes (also as Projects in the Solution).

Yesterday, suddenly i got the 'The breakpoint will not currently be hit. No symbols have been loaded for this document.' message to appear in the IDE, but it only affects the Web Appliaction, i can debug the Silverlight and the Winform App.

What i tried / did to get rid of the message:

  • Reset Visual Studio Settings
  • removed all files in every \Temporary ASP.NET Files Folder (there is one for each 32bit/64bit and for Framework 2.0 and 4.0)
  • tried to debug using Visual Studio Integrated Web server - normally i use IIS, in the project output of the solution i deleted every obj and bin folders in every project folder
  • created a new solution and added all the projects to this new solution
  • deleted the solution suo file
  • created a new ASP.NET Web Application to test if it is a VS-installation issue => i can debug this new project/solution
  • rebooted the machine several times
  • repaired the vs.net installation
  • did an IISReset
  • removed the Web App from IIS
  • used the Create Virtual Directory Button under Project Properties of the Web App to create a new Web App in IIS
  • changed the Framework Version of every project from 3.5 to 4.0
  • Opened the Solution on my second machine=> same behavior
  • crawled Microsoft Connect for bugs / similar issues
  • SPENT 7 HOURS.

So, this happens the 2nd time in my life. last time i solved it by deleting Temporary ASP.NET Files Folder, but this time i need your help.


Source: (StackOverflow)

Enable IIS7 gzip

How can I enable IIS7 to gzip static files like js and css and how can I test if IIS7 is really gziping them before sending to the client?

Thanks!


Source: (StackOverflow)

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode

I Installed DotNetOpenAuth SDK-3.4.5.10201.vsix and I can't get it working. It works locally (when I run as localhost) but when i try to publish it ain't working.

The IIS error message I get is

Error Summary
HTTP Error 500.22 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

AND

Module       ConfigurationValidationModule  
Notification BeginRequest  
Handler      StaticFile  
Error Code   0x80070032  

then there are some suggestions on how to solve the problem:

Things you can try:

  • Migrate the configuration to the system.webServer/modules section. You can do so manually or by using AppCmd from the command line - for example, %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/". Using AppCmd to migrate your application will enable it to work in Integrated mode, and continue to work in Classic mode and on previous versions of IIS.

  • If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/validation@validateIntegratedModeConfiguration to false.

  • Alternatively, switch the application to a Classic mode application pool - for example, %SystemRoot%\system32\inetsrv\appcmd set app "Default Web Site/" /applicationPool:"Classic .NET AppPool". Only do this if you are unable to migrate your application.
    (Set "Default Web Site" and "Classic .NET AppPool" to your application path and application pool name)

But the problem is that I don't have access to the ISS server as I am not the owner of it. Is there any way to solve this?


Source: (StackOverflow)

Where can I find the IIS logs?

I'm trying to set up an application from a third party, which requires a supporting website hosted in my local IIS. I've created a website exactly as explained in their install guide, but am having some problems, and would like to see what the IIS log has to say. Embarrassingly enough, the problem is I can't find the log files!

So my question is: Where does IIS7 store logs by default?


Source: (StackOverflow)

What are all the user accounts for IIS/ASP.NET and how do they differ?

Under Windows Server 2008 with ASP.NET 4.0 installed there is a whole slew of related user accounts, and I can't understand which one is which, how to they differ, and which one is REALLY the one that my app runs under. Here's a list:

  • IIS_IUSRS
  • IUSR
  • DefaultAppPool
  • ASP.NET v4.0
  • NETWORK_SERVICE
  • LOCAL SERVICE.

What is what?


Source: (StackOverflow)

What is the difference between 'classic' and 'integrated' pipeline mode in IIS7?

I was deploying an ASP.NET MVC application last night, and found out that it is less work to deploy with IIS7 set to integrated mode. My question is what is the difference? And what are the implications of using one or the other?


Source: (StackOverflow)

Error - Unable to access the IIS metabase

After installing Visual Studio 2012 and opening my solution I get a series of errors in this form:

The Web Application Project Foo is configured to use IIS.
Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

I get this for each of our web applications. Things I have tried:

  1. Running Visual Studio as Administrator
  2. Running aspnet_regiis.exe -ga MyUserName
  3. Running aspnet_regiis.exe -i

These seem to be common solutions for this problem but I have not had any success with them. Is there anything else I can try to do?


Source: (StackOverflow)

Maximum request length exceeded

I am getting this error when I am trying to upload a video in my site.

Can you tell me how to fix this?


Source: (StackOverflow)

IIS - this configuration section cannot be used at this path (configuration locking?)

I've encountered an error deploying a site to a server. When trying to load the home page, or access authentication on the new site in IIS, I get the error:

Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

More detail can be found here, in Scenario 7 matches my hex error code.

The solution given on the linked site above is to set Allow for overrideModeDefault in the section mentioned in my error, in the applicationHost.config file. In my case, under Security in system.webServer. But if I look at the applicationHost.config on my local computer, where the site is properly deployed already, that section is set to Deny.

If this solution is correct, how is my local instance running just fine with the same web.config? According to my applicationHost.config, that section should be locked, but it's not. I'd prefer to not change the applicationHost.config file, because there are many other sites running on that server. Is there another solution?


Source: (StackOverflow)

How to explain Katana and OWIN in simple words and uses?

I have read many articles about the OWIN and Katana projects, but I could not get the whole picture of it.

For a normal web developer who uses ASP.NET:

  1. What exactly is OWIN and what problems does it solve (in simple words). What is its relation to IIS?
  2. Does OWIN replace IIS? if not, in what situations does OWIN best fit?
  3. How could OWIN help me in my daily work projects?
  4. How could OWIN help me in a self-improvement projects?

Source: (StackOverflow)

"The page you are requesting cannot be served because of the extension configuration." error message

I'm getting this error message when trying to run my application. I don't know how to fix it:

HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

Here's a screenshot of the error page: alt text

What can I do to fix this error?


Source: (StackOverflow)

How to get current user in Asp.Net MVC

In forms model, I used to get current logged in user by

Page.CurrentUser

How do I get current user inside a controller class in ASP.NET MVC?


Source: (StackOverflow)

Turn off Visual Studio Attach security warning when debugging IIS

When using Visual Studio 2008 or 2010, every time you attach to IIS w3wp.exe you get an Attach Security Warning,

How do you turn this of?

It would be cool to know also, how to keep it attached for linger, as this seems to time out after a while.

Btw: I Added this as a comment to the answer below, the first thing I did was try the msdn article http://msdn.microsoft.com/en-us/library/ms241736.aspx but that doesn't work.


Source: (StackOverflow)