sql server - Login failed exception on BizTalk Database when going via windows service, while it works via web api (within the same library) -


i'm getting login failed exception on biztalk management database, while has been proven connectionstring works , user has rights (since using sa testing). works when going through web api, while won't when going trough windows service.

the exception looks this:

cannot open database "biztalkcontextmgmtdb" requested login. login failed. login failed user 'sa'. - system.data.sqlclient.sqlexception

i use same connection string in app config windows service in web config asp.net webapi

the connection string use looks this:

    <add name="biztalkcontext" connectionstring="server=servername;database=biztalkmgmtdb;user id=sa;password=******;"   /> 

the code connect in class library communicating biztalk , connectionstring set follows:

    private static string connectionstring =         configurationmanager.connectionstrings["biztalkcontext"].connectionstring; 

the strange thing here when try run method in class library within web api, everyting works fine! when try run methods in class library within windows service throws shown exception.

what possibly problem here, since use same techniques , same libray in both projects.

edit

rick van bodegraven suggested add following connection string. "trusted_connection=false;encrypt=true;"

this resulted in new exception:

a connection established server, error occurred during login process. (provider: ssl provider, error: 0 - certificate chain issued authority not trusted.) - system.data.sqlclient.sqlexception

it turned out restarting server , reinstalling windows service somehow fixed problem. think doing right along, there bug in deployment proces somewhere.

so know not answer , question not known issue. people same problem can try restart, re-install , re-deploy every single thing. unfortunately advice have on problem.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -