7

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

One of the controllers in this app is called ReportsController. The route table entries for this controller use 'Reports' as the controller name part. The problem I have is that, using IIS 7.5 on my local machine, I simply cannot access any of the Reports action methods. If I try to access, say, '/Reports/Index' from Chrome or Firefox, I get a 401 Unauthorized response (as seen using Fiddler) and the browser displays its username/password entry dialog.

Please note the following:

  • All other non-Report pages in the application work correctly.
  • If I add a breakpoint to Application_BeginRequest, it is not hit when requesting a Reports page.
  • If I change the Reports routing entries in the route table registration code so that I have to access paths like '/Reportss/Index' (note the extra 's') then these Reports pages work correctly.
  • I have tried deleting then recreating my Web application in IIS.
  • The Reports pages work fine if I run the application using the Visual Studio 2008 development server (Cassini).
  • There is no directory called Reports in the application directory.
  • The Reports pages work correctly on our UAT environment, also under IIS 7.5.
  • I have reviewed my IIS setting several times, including comparing them with those on UAT, and I can't see a problem.

While I can use Cassini to access the Reports pages, I would really like to understand what is causing this issue.

7
  • Have you compared web.config files? Simple things like http modules either missing or in the wrong order can cause stuff like this. There may be a web.config in your views folder, it may be worth checking that as based on an article i found it could be due to secured paths. haacked.com/archive/2008/06/25/aspnetmvc-block-view-access.aspx Commented Feb 5, 2011 at 1:40
  • search all of your solution files for a word "reports"..maybe you might find some code that does something special to this routes or this controller (maybe Authorize attribute somewhere, maybe on some base controller or something similar). Also authentication settings are set up in web.config as Hawxby already suggested. Commented Feb 5, 2011 at 1:54
  • However, since it seems it is only related to one particular Windows Server and its IIS, it might be something in IIS config. It's possible you have another site or virtual directory that works at /Reports and that one could have special authentication/authorization settings set up. One that I can think of is MS SQL Server Reports Service.. Commented Feb 5, 2011 at 1:57
  • 1
    @mare that's what I was going to suggest. @stevejay, I bet you have SSRS installed on that website in IIS. Commented Feb 5, 2011 at 2:02
  • Have you tried Route Tester/Debugger? Commented Feb 5, 2011 at 3:27

3 Answers 3

12

If you have Reporting Services installed on your machine. try to create a new web site and use it. If you have SSRS installed on your machine it uses /reports for hosting reports.

Sign up to request clarification or add additional context in comments.

2 Comments

Many thanks @Cengiz, and @mare and @Sean - Reporting Services was the issue. I fixed this by accessing the Reporting Services Configuration Manager and changing the host header name on the Report Manager URL (which is the path to the troublesome Reports directory).
+100 - this was a huge help. I followed the procedure here and changed the port to 801 -- bretstateham.com/…
1

I have had problems using the directory name 'Reports' at the root of a .net 2.0 website on IIS 7.5. It generates a 503 Error, indicating that there is an error at the system level before IIS tries 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.

Comments

1

I have the exact same issue in my MVC Application with reporting services installed on the same server where code was deployed. I have changed the Reporting Manager URL in "SQL Server Reporting Services Configuration" which was hostName/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 as expected.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.