Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 424535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:17:23+00:00 2026-05-12T19:17:23+00:00

I am working on a WCF Service(implemented with Fluent NH), and it is hosted

  • 0

I am working on a WCF Service(implemented with Fluent NH), and it is hosted as a Windows Service.

I am using a console application to test calling service methods.

Now, when I set connection string in hibernate.cfg.xml as

<property name="connection.connection_string">Server=dev;Initial Catalog=DBTest;Integrated Security=True;</property>

It throws the error:
SqlException: Login failed for user

But if I change connection string to:

<property name="connection.connection_string">Server=dev;Initial Catalog=DBTest;User Id=twr;Password=manager1;</property>

It successfully calls the service methods.

While all WCF Service Library, Hosting Windows Service and Console Application sits on my local machine only,

Can anyone please help me in understanding why it doesn’t work with Integrated Security=true?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:17:23+00:00Added an answer on May 12, 2026 at 7:17 pm

    Integrated Security = true means that this application will attempt to authenticate itself using “Windows Authentication” mode on the SQL Server you’re connecting to. The service is running under a particular user account – it will use that user’s account permissions to login to SQL.

    If your SQL Server instance does not permit the user account of that Windows Service to login, you’ll get that error. It’s quite likely that the user the service runs as in your unit test is different than the test console application.

    Try this – run your test console application and bring up Task Manager. Under the processes tab, look at the process associated with your service and the username it is running under. Run your unit test framework and note the username as well – they’re probably different.

    Go to SQL Server Management Studio and check to see under Security -> Logins whether the account that the service runs as (the one you found by using Task Manager) is listed. If not, add it and grant it permissions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working WCF service. I want to deploy it on Windows Azure.
I'm working on a self-hosted WCF service for which encrypted communications is an option.
So I am working on setting up a WCF service, hosted in iis7. The
I am currently working on a WCF service with a large number of methods
I need to host a WCF service inside a Windows Forms application and call
I have a very strange problem. I have a working WCF service. [ServiceContract] public
I'm working on a WCF service that requires Membership and Profile access. I got
I'm working on a wcf service to stream a datafile & its relevant information
I have a working .Net WCF HTTP service. If I put the URL into
I'm currently working on a WCF service that reaches out to another service to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.