UPDATE:IIS7 & Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule đăng ký các vấn đề
Trong Windsor 2,5 tên lắp ráp là Castle.Windsor
không Castle.MicroKernel
Tôi đang cố gắng để triển khai một ASP.NET MVC ứng dụng cho IIS7 và tôi gặp phải lỗi này:
Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule Add '' to the section on your web.config
My httpModules contains:
<httpModules>
<add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.MicroKernel"/>
</httpModules>
system.webServer xử lý phần chứa
<handlers>
<remove name="PerRequestLifestyle"/>
<add name="PerRequestLifestyle" preCondition="managedHandler" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.Microkernel" verb="*" path="*.castle" />
</handlers>
tôi thêm phần verb="*" path="*.castle"
như tôi đã nhận lỗi khi họ bị mất tích. Không chắc liệu giá trị của chúng có chính xác không.
Bất kỳ ai biết vấn đề ở đây là gì?
PerWebRequestLifestyleModule là một mô-đun, không phải là một bộ xử lý. Loại bỏ nó khỏi phần xử lý. –
Hãy thử bao gồm Phiên bản, Văn hóa và PublicKeyToken trong khai báo mô-đun. –
Cảm ơn, tôi đã xóa tuyên bố mô-đun. Phiên bản, Văn hóa và PublicKeyToken không cần thiết. Tôi cũng phải thêm làm người xử lý. Cũng phải tạo thư mục 'C: \ TempImageFiles' để làm cho nó hoạt động. –