Why can't nhib.pdf use trusted connections in Asp.net projects?

Source: Internet
Author: User
Recently, an Asp.net project uses nhib.pdf as the data access layer. All object classes and their ing files pass the nunit test. Move the configuration content of APP. config under the test project to Web. config under the Asp.net project, and the result is "adoexceptin cannot open connection. If you have no plans, try not to use trusted connections. Hahaha, the result is normal.

The following configuration items can be used normally:

< Nhib.pdf >
< Add
Key = "Hibernate. show_ SQL"
Value = "True"
/>
< Add
Key = "Hibernate. Connection. provider"
Value = "Nhib.pdf. Connection. driverconnectionprovider"  
/>

< Add
Key = "Hibernate. dialect"
Value = "Nhibect. dialect. mssql2000dialect"  
/>

< Add
Key = "Hibernate. Connection. driver_class"
Value = "Nhib.pdf. Driver. sqlclientdriver"  
/>

< Add
Key = "Hibernate. Connection. connection_string"  
Value = "Server = localhost; initial catalog = supercargo; user id = sa; Password = network"  
/>

</ Nhib.pdf >

If you change the last section to "trusted connection ",
<Add
Key = "hibernate. Connection. connection_string"
Value = "Server = localhost; initial catalog = supercargo; Integrated Security = sspi"
/>

When nunit is used for testing, we can pass the test normally. When it is applied to the Asp.net project, we will prompt that the connection cannot be opened.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.