简体   繁体   中英

Error with <add assembly=“System.Data.SqlClient, Version=10.50.1600, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/>

Why do I get this error? How I can fix it? I'm connecting from Web.config in an application that I started to do but I finish school issues because it is a team effort. The teacher has told me I should put that online so that my connection is well made ​​but not if publicToken or something else this evil at the time of writing the line is enclosed in asterisks. I need to indicate that I am writing wrong Please will thank you.

Server Error in '/' Application.

Configuration Error Description: Error during processing of a configuration file required to service this request. Check the specific error details below and modify your configuration file accordingly. Parser Error Message: Could not load file or assembly 'System.Data.SqlClient, Version = 10.50.1600, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'or one of its dependencies. The system can not find the file specified. Source Error:

Line 51:   <add assembly="System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 52:   <add assembly="System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 53:   **<add assembly="System.Data.SqlClient, Version=10.50.1600, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>**

In .NET there is no such assembly as System.Data.SqlClient, Version=10.50.1600, ... . SqlClient is the part of standart .NET Framework distribution.

For example, System.Data.SqlClient.SqlConnection :

Namespace:  System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

Well, you can browse the GAC ( Global Assembly Cache ) for meet the assembly data. Use the following command from de command prompt :

gacutil -l

This list the content of the GAC with the information that you need.

Have you checked to make sure that the dll indicated is being deployed and that the version number matches the version you specify above? The error is pretty clear. The system can't find the assembly that the code refers to on this line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM