为什么URL路由在Visual Studio中不起作用?

时间:2021-03-16 11:05:18

Does anyone else have problems with running URL routing projects in Visual Studio?

有没有其他人在Visual Studio中运行URL路由项目时遇到问题?

The Visual Studio Web server doesn't seem to want to play nice with URL routing. It doesn't invoke the engine at all in fact, which means you can't debug, and have to run the project out of IIS to get it work.

Visual Studio Web服务器似乎不想使用URL路由。它根本不会调用引擎,这意味着你无法调试,并且必须从IIS运行项目才能使它工作。

Is there a workaround for this?

这有解决方法吗?

Edit: By "URL routing" I mean the Microsoft framework in the "System.Web.Routing" namespace.

编辑:“URL路由”我指的是“System.Web.Routing”命名空间中的Microsoft框架。

Edit: Using Web forms, not MVC.

编辑:使用Web表单,而不是MVC。

1 个解决方案

#1


My guess is that it's not configured correctly for the version of IIS that you are running locally.

我的猜测是,它没有正确配置您在本地运行的IIS版本。

Here is a good resource for setting it up. Can you post code?

这是设置它的好资源。你可以发布代码吗?

#1


My guess is that it's not configured correctly for the version of IIS that you are running locally.

我的猜测是,它没有正确配置您在本地运行的IIS版本。

Here is a good resource for setting it up. Can you post code?

这是设置它的好资源。你可以发布代码吗?