9

Hôm nay tôi chỉ định dạng ứng dụng WCF của mình bằng cách sử dụng profiler của studio trực quan trong chế độ Thiết bị đo đạc. Sau đó, tôi cần phải xuất bản lên máy chủ web của mình và đột nhiên tôi gặp lỗi khi nói rằng không thể tìm thấy đường dẫn tệp Microsoft.VisualStudio.Enterprise.AspNetHelper.Visual Studio 2013/2015 profiler thêm Không thể xuất bản các dòng trong web.config?

khi tôi xem xét web.config của mình, tôi đã thấy rằng các dòng sau đã được thêm vào bởi phiên lược tả.

<system.web> 
<compilation targetFramework="4.0" debug="true" assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, 
Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 


     <runtime> 
<generatePublisherEvidence enabled="false"/> 

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
      <assemblyIdentity name="Microsoft.VisualStudio.Enterprise.AspNetHelper" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> 
      <codeBase version="12.0.0.0" href="file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL"/> 
      </dependentAssembly></assemblyBinding></runtime> 

<appSettings> 
<!--<add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\vsinstr.exe"/>--> 
</appSettings></configuration> 

Nó là rất rõ ràng rằng nó trông giống cho một số DLL trên máy chủ nhưng vì con đường này là không hợp lệ trên máy chủ như VS không được cài đặt, nó ném một ngoại lệ. Tại sao điều đó xảy ra và làm thế nào để tránh những dòng này được thêm vào trong web.config? Nó sẽ khá cồng kềnh để loại bỏ những dòng này mỗi khi tôi làm một phiên lược tả.

CẬP NHẬT: Sự cố này cũng xảy ra trên VS2015. Nếu bạn bắt đầu VS công cụ profiling, Nó cho biết thêm một dòng vào web.config

> <add 
> key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" 
> value="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team 
> Tools\Performance Tools\vsinstr.exe"/> <dependentAssembly> 
>    <assemblyIdentity name="Microsoft.VisualStudio.Enterprise.AspNetHelper" 
> culture="neutral"/> 
>    <codeBase version="14.0.0.0" href="file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2014.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL"/></dependentAssembly> 

và nếu bạn xuất bản lên máy chủ, bạn sẽ nhận được lỗi này bên dưới

Configuration error 

Description: An error occurred while processing a configuration file that is needed for this request. Check the specific error details below and modify your configuration file appropriately.

Parser Error Message: File or assembly 'Microsoft.VisualStudio.Enterprise.AspNetHelper, Version = 14.0.0.0, Culture = neutral, PublicKeyToken = "or one of its dependencies not found. The system can not find the file specified.

Source Error:

Application error occurred on the server. Due to the current custom error settings for this application the details of the application error remotely (for security reasons) can be displayed. However, they can be viewed by browsers running on the local server.

Source File: C: \ www \ web.config Line: 52

Load Trace Assembly: can be determined with the following information, why the assembly Microsoft.VisualStudio.Enterprise.AspNetHelper, Version = 14.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a could not be loaded.

WRN: Assembly binding logging is OFF. You can enable logging assembly bind failure, remove the registry value [HKLM \ Software \ Microsoft \ Fusion! EnableLog] (DWORD) to 1 set. Note: Assembly binding logging error leads to a certain loss of performance. You can turn this feature off, remove the registry value [HKLM \ Software \ Microsoft \ Fusion! EnableLog].

+1

Xin chào, đây là nhóm Profiler của Visual Studio và đây chắc chắn là lỗi. Bạn có thể vui lòng gửi một lỗi kết nối và bao gồm thông tin bao gồm phiên bản hệ điều hành dev của bạn, phiên bản VS, phiên bản IIS, phiên bản hệ điều hành máy chủ IIS, v.v. tại https://connect.microsoft.com/VisualStudio/ –

+0

@AndreHamilton tôi sẽ điền vào báo cáo lỗi vào thứ hai, nhưng tôi cũng đã gặp vấn đề này, vì vậy nó vẫn là một vấn đề và không chỉ là một người. – Kyle

+0

Trong VS2015 R3 nó vẫn là một vấn đề –

Trả lời

3

Trong trường hợp của tôi nó là vấn đề với visual studio profiler.It kiểm tra đường dẫn exe cục bộ trong web.config. Tôi nhận xét dưới đây 2 dòng trong web.config và nó giải quyết vấn đề của tôi.

<!--<compilation debug="true" targetFramework="4.5" assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>--> 
<!--<add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\vsinstr.exe"/>--> 
+0

Bạn đã thực sự đọc câu hỏi chưa? bạn đang lặp lại những gì tôi đã viết ở trên và câu trả lời của bạn không liên quan gì đến câu hỏi – batmaci

Các vấn đề liên quan