0

I know there are quite a lot of resources related to this question. However most of them are related to old .Net versions. I checked the following link1 and link2. I tried both and other similar solutions but it doesn't work.

Wierd thing that I failed to figure out so far is in one project it doesn't complain. The other project is what causes the issue. Both of these are using .Net Framework is 4.6 and i am using VS 2017. This is what I get in the console. the error

Both projects are refering to the same System.Web.Extensions with v4.0.30319. I compared web.config in both projects' related areas to see whether there are any differences but I couldn't find any.

I would appreciate some alternate methods for me to troubleshoot. I am running out of options!!!

Leonardo Henriques
  • 784
  • 1
  • 7
  • 22
user2058413
  • 691
  • 3
  • 10
  • 28

1 Answers1

0

Ok found the issue.

I was using RDLC inside a MVC project. To get RDLC to work I had to use aspx page which needed *.axd to get rendered to the browser. These are handled by a HttpHandler. Since we are dealing with two beasts (MVC & Asp.Net), we don't want MVC to try and mess up with handling axds. We should pass it to HttpHandler. There fore adding this line to your routeconfig.cs solves the problem.

Since there were lot of axd related questions with MVC, may be this should be generalized to a question asking "how to get ScriptResource & WebResource axd to work within MVC"

user2058413
  • 691
  • 3
  • 10
  • 28