English 中文(简体)
MVC3 虚拟目录浏览器非常缓慢
原标题:MVC3 virtual directory view folder is very slow

我有MVC3申请,通常使用观点和管制人员。

I also have a controller TestController that returns views from a virtual directory setup in IIS 7.5.

Inside IIS under Views I ve added the virtual directory Test which points to a directory on my local disk with my cshtml pages.

在我第一次提出请求后,意见的提出需要20分钟,但随后的请求有二次。

我的当地机器上的实际文件夹有1,000页,这是否是一个问题?

为什么我提出20分钟的申请(第一次请求),以便从虚拟名录和第二版的角度来看待解决办法本身?

非常感谢任何帮助。

[Further Update]——这种情况发生若干次,然后才停止。 然后,我不得不去掉虚拟目录,并在国际会计准则中重新填写,并再次开始。

I decided to run ants performance profiler. This is the result (I stopped it after almost 30 minutes of waiting) Ants performance profiler

我感觉到,我们可能陷入僵局,但我不知道如何检验这一僵局。

问题回答

在创建我自己的虚拟道路提供商之后,我发现,一旦我虚拟名录要求提交档案,它就通过名录中的每一份档案,并在每份档案中打上“GetCacheDependency”。

我认为,上文Pranav的解释是正确的,因此答案是正确的,但下面是我采取的办法:

  1. Moved my files from disk to couchbase
  2. Create my own custom VirtualPathProvider
  3. Create my own custom CacheDependency
  4. If a file is a virtual file return my custom CacheDependecy, else use the default
  5. Use MSMQ to invalidate a cache




相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Enable PHP highlights in VS 2010?

I ve heard that Visual Studio 2010 Beta 2 has support for PHP. When I load a PHP file though, it has nothing highlighted and is nothing more than a glorified text editor. Is there a way to enable it?...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...