Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Webservice - ODBC - sqlServer

Reply
Thread Tools

Webservice - ODBC - sqlServer

 
 
TheMaxx
Guest
Posts: n/a
 
      12-07-2006
I need to access ODBC from remote computer, if there's a better way other
than WebService please let me know.

So, i am doing web service which connects on ODBC, which connects to
SqlServer 2000 (Windows auth.)
First error was:
Login failed for user 'MyComputerNmae\ASPNET'.

Then i unchecked "Anonymous acces" from IIS for this webservice

I added to web.config of webService:

<identity impersonate="true"
userName="DOMAIN\username"
password="pwd"/>

When i call method from browser directly to web service i get expected
results.
When trying from application that uses WebServices i get an error:
"The request failed with HTTP status 401: Access Denied."

What can cause this error?

p.s. call from webservice looks like this:

OdbcDataAdapter adapter = new OdbcDataAdapter(query, odbcConnectionString);
DataSet ds = new DataSet();
adapter.Fill(ds);
return ds;





 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      12-07-2006
"TheMaxx" <> wrote in message
news:el8k3v$2p$...
>I need to access ODBC from remote computer, if there's a better way other
>than WebService please let me know.


I would think about using .NET Remoting instead of Web Services. Web
Services are meant to be platform-independant, and there are aspects to
their use which make it difficult to use .NET-specific features. If you
don't need the platform-independence, I believe it's best to do without it.

As to your specific problem, I'd need to see the client code which calls the
web service. In particular, does the client code set the Credentials on the
web service proxy? Also, if you want to use Windows Authentication to the
web service, I believe you'll have to make sure that Anonymous access is
turned off in IIS.

Finally, out of curiosity, why ODBC instead of using the Sql Server client
classes? I'm referring to SqlConnection etc.

John


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
True JDBC (not odbc bridge) for MS VM? - SQLServer 2000 G Java 2 10-12-2008 12:38 AM
Upgrading ASP w/SQLserver 2000 to ASP.NET w/ SQLserver 2005 =?Utf-8?B?SmVmZnJleQ==?= ASP .Net 2 04-27-2007 03:33 PM
Webservice - ODBC - sqlServer (2) TheMaxx ASP .Net 0 12-07-2006 08:49 AM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM



Advertisments