So the problem is in the subject. Everything is fine while the application is launched in the VS Development Server (with Virtual path = "/"). But when I change either Virtual path or run the application under IIS 7 with Virtual directory, /rpc URL becomes unavailable (404 - Not found).
Steps to reproduce the problem:
1. Create new empty MVC 2 Application - "Mvc2Application"
2. In the Package Manager Console type:
Install-Package ExtDirectHandler
3. Go to the project's Properties - Web, check "Use Local IIS Web server" and click "Create Virtual Directory". You should have the "
http://localhost/Mvc2Application" URL.
4. Open Web.config file and add the following lines to the "system.web" section:
<httpHandlers>
<add verb="*" path="/rpc" type="ExtDirectHandler.DirectHttpHandler, ExtDirectHandler" />
</httpHandlers>
5. Open Global.asax.cs file and add the following line to the RegisterRoutes function:
routes.IgnoreRoute("rpc/{*pathInfo}");
6. Create HomeController and the corresponding Home view
7. Open created view and add the following line inside the <head> tag:
<script type="text/javascript" src="rpc"> </script>
8. Compile and run the application.
Any solution for applications located in virtual directories?..
Thanks.