The problem of routing with a specific controller name using ASP.NET MVC 1 in IIS 7

I joined the team developing the ASP.NET MVC version 1 application. I run this application on my local machine using IIS version 7.5. My operating system is Windows Server 2008 R2 Enterprise Edition. I am using Visual Studio 2008 SP1 for development.

One of the controllers in this application is called ReportController. Route table entries for this controller use Reports as part of the controller name. The problem is that using IIS 7.5 on my local computer, I just can’t access any of the Reporting action methods. If I try to access, say, “/ Reports / Index” from Chrome or Firefox, I get a 401 Unauthorized response (as seen with Fiddler), and the browser displays a username and password dialog box.

Please note the following:

  • All other pages without a report in the application work correctly.
  • If I add a breakpoint in Application_BeginRequest, it will not suffer when I request a report page.
  • If I change the Reports routing entries in the registration code of the route table so that I have to access paths like "/ Reportss / Index" (note the additional "s"), then these report pages work correctly.
  • I tried uninstalling and then re-creating my web application in IIS.
  • Report pages work fine if I run the application using the Visual Studio 2008 development server (Cassini).
  • There is no directory in the application directory called Reports.
  • Report pages work correctly in our UAT environment, also in IIS 7.5.
  • I checked the IIS settings several times, including comparing them with the settings in the UAT, and I see no problem.

While I can use Cassini to access the Reports pages, I would really like to understand what causes this problem.

+6
asp.net-mvc
source share
3 answers

If Reporting Services is installed on your computer. try creating a new website and using it. If SSRS is installed on your computer, it uses / reports to post reports.

+11
source share

I am having problems using the Reports directory name in the .net 2.0 root directory on IIS 7.5. It generates a 503 error indicating a system level error before IIS attempts to serve the page. I am not sure if Reporting Services is installed on my server. I just changed the directory name, all links and everything worked.

+1
source share

I have the same problem in my MVC application with Reporting Services installed on the same server where the code was deployed. I changed the Report Manager URL in SQL Server Reporting Services Configuration, which was the host name / reports and assigned a new name, i.e. SSRSReports, so the virtual directory is now hostName / SSRSReports.

Now my application as well as SSRS reports are working properly.

0
source share

All Articles