Wednesday, March 28, 2012
Web Service & SQL Server Authentication
I have this weird problem. I created a Web Service that extracts data from the SQL Server and then return it as a XML document.
The problem is when the Web Service gets to the code to open the Connection to the server it gives this error.
System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Now my Win32 application works just fine, using the same code. Thus I believe the problem might be the settings of IIS.
But unfortunately I don't even know where to start looking.
Some help would really be appreciated.
Thanx in advanceIf you are trying to open a connection via sql server authentication (note: not windows), you need to grant access to that account in your db. If you are using windows authentication, you need to grant access to the asp.net account.
Sorry misread
Monday, March 26, 2012
web service authentication with active directory
i have a windows app that uses web serivces to access data and i use
integrated windows to authenticate.
is it a way to authenticate with users in active directory ?
and how do i do that ?There is already a sample available in Quickstart guide...
http://samples.gotdotnet.com/quicks...reservices.aspx
Regards
Jignesh Desai
www.dotnetjini.com
"Geir Sanne" <GeirSanne@.discussions.microsoft.com> wrote in message
news:749DAF3F-6165-4699-B554-6D6E82DE52A0@.microsoft.com...
> hi!!
> i have a windows app that uses web serivces to access data and i use
> integrated windows to authenticate.
> is it a way to authenticate with users in active directory ?
> and how do i do that ?
hi!!
i tried the guide, but it didnt help me.
ive tried to use WSE and the UsernameTokenManager.
This works fine, except that if i dont pass any UsernameToken to the service
the user is acceptet. You know how to make the webservice call the
UsernameTokenManager even if a UsernameToken isnt passed ?
regards
geir sanne
"Jignesh Desai" wrote:
> There is already a sample available in Quickstart guide...
> http://samples.gotdotnet.com/quicks...reservices.aspx
> Regards
> Jignesh Desai
> www.dotnetjini.com
>
web service authentication with active directory
i have a windows app that uses web serivces to access data and i use
integrated windows to authenticate.
is it a way to authenticate with users in active directory ?
and how do i do that ?There is already a sample available in Quickstart guide...
http://samples.gotdotnet.com/quicks...reservices.aspx
Regards
Jignesh Desai
www.dotnetjini.com
"Geir Sanne" <GeirSanne@.discussions.microsoft.com> wrote in message
news:749DAF3F-6165-4699-B554-6D6E82DE52A0@.microsoft.com...
> hi!!
> i have a windows app that uses web serivces to access data and i use
> integrated windows to authenticate.
> is it a way to authenticate with users in active directory ?
> and how do i do that ?
hi!!
i tried the guide, but it didnt help me.
ive tried to use WSE and the UsernameTokenManager.
This works fine, except that if i dont pass any UsernameToken to the service
the user is acceptet. You know how to make the webservice call the
UsernameTokenManager even if a UsernameToken isnt passed ?
regards
geir sanne
"Jignesh Desai" wrote:
> There is already a sample available in Quickstart guide...
> http://samples.gotdotnet.com/quicks...reservices.aspx
> Regards
> Jignesh Desai
> www.dotnetjini.com
>