venus
venus

Reputation: 11

Problem of can't publish the Web API in IIS

This is the error that I get

Can anyone tell me what problem is this?

</configSections>
    <connectionStrings>
      <add name="StudentDetailsEntities" connectionString="metadata=res://*/StudentDataModel.csdl|res://*/StudentDataModel.ssdl|res://*/StudentDataModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LAPTOP-JQRLR1PP\SQLEXPRESS;initial catalog=StudentDetails;User=sa;Password=xxx;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
      <add name="StudentDetailsEntities1" connectionString="metadata=res://*/StudentDataModel.csdl|res://*/StudentDataModel.ssdl|res://*/StudentDataModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LAPTOP-JQRLR1PP\SQLEXPRESS;initial catalog=StudentDetails;User=sa;Password=xxx;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    </connectionStrings>

Upvotes: 0

Views: 87

Answers (1)

Cleptus
Cleptus

Reputation: 3531

The Integrated Security=True is incompatible with User=xxx;Password=yyy

Depending on your specific scenario it should be either:

initial catalog=StudentDetails;integrated security=True;

or

initial catalog=StudentDetails;User=sa;Password=xxxx;

The first one would use the credentials of the user running the process, the second one the database user 'sa'.

As long as you already know good working credentials (the 'sa' user) I would suggest the second option.

Upvotes: 2

Related Questions