0

我想创建一个具有以下虚拟路径(插件框架)的样式包:

"~/Areas/Domain.PluginTest.Wui/Bundles/PluginCss"

当我转到该路径时,我收到一条错误消息,指出该文件不存在。静态文件处理程序正在尝试查找文件。我怎样才能使这个工作与捆绑?

System.Web.HttpException
Message:

File does not exist.
Stack trace:

at System.Web.StaticFileHandler.GetFileInfo(String 
virtualPathWithPathInfo, String physicalPath, HttpResponse response) at 
System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String 
overrideVirtualPath) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext 
context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.
HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, 
Boolean& completedSynchronously)
4

1 回答 1

0

捆绑器正在尝试查找您的路径~/Areas/Domain.PluginTest.Wui/Bundles/PluginCss,但该路径不存在。这就是为什么我们通常在捆绑路径前面加上bundles

bundles.Add(new StyleBundle("~/bundles/Areas/Domain.PluginTest.Wui/Bundles/PluginCss")
       .Include());
于 2013-11-27T16:41:58.990 回答