Web service ERROR [HYT00] [Microsoft][ODBC SQL Server Driver]Timeo

M

mickweb

I have created a web service on my local pc which access's sql server 2005
db. My sqlserver is set up to use windows authentification. I have created a
virtual directory for my web service using VS 2005 (Anonymous access
enabled). I can run the web service from virtual site i.e.
http://localhost/pdasystem/jobs.asmx and it returns the data. When I run the
same web service (http://localhost/pdasystem/jobs.asmx) from simple windows
app using web reference generated, the service returns the error below i.e.
timeout. I am accessing the database via a dsn. This is because I am
developing using a hosting company and they require you to use their DSN.
They have asked me to add the following line to web.config
<trust level="Full" originUrl="" /> to enable web pages to display on hosted
web site.
?ex
{"ERROR [HYT00] [Microsoft][ODBC SQL Server Driver]Timeout expired"}
[System.Data.Odbc.OdbcException]: {"ERROR [HYT00] [Microsoft][ODBC SQL
Server Driver]Timeout expired"}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: null
Message: "ERROR [HYT00] [Microsoft][ODBC SQL Server Driver]Timeout
expired"
Source: ""
StackTrace: " at
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode
retcode)\r\n at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
connection, OdbcConnectionString constr, OdbcEnvironmentHandle
environmentHandle)\r\n at
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject)\r\n at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup)\r\n at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)\r\n at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)\r\n at
System.Data.Odbc.OdbcConnection.Open()\r\n at
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[]
datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command
, CommandBehavior behavior)\r\n at
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)\r\n at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,
String srcTable)\r\n at pda.data.DataHandler.executeSPDataSet(String
storedProcedure) in c:\\pdasystem\\App_Code\\data\\DataHandler.cs:line 469"
TargetSite: {System.Reflection.RuntimeMethodInfo}

Do I need to setup users in Sql Server?
 
S

Steven Cheng[MSFT]

Hello mickweb,

From your description, you'll get some "ERROR [HYT00] [Microsoft][ODBC SQL
Server Driver]Timeout expired" error when try acccesing a remote SQL SErver
database in an ASP.NET webservice, correct?

Based on my experience, this is likely a data accessing issue in ASP.NET
environment. If the webservice can work well when you directly access it
locally through the asmx page, what I can think so far is the security
context issue. However, since you've said that you're using anonymous
access.

I suggest you still try the following things to see wehther it is a
security context specific issue:

1. if the SQL Server can use SQL authentication (with sql login id) , try
using SQL login in the ODBC datasource to see whether it works.

2. Try changing your ASP.NET webservice's security context(you can change
the application pool's identity or try impersonating through a fixed user
in the web.config file) to see whether it works.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top