473,394 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Problem With Web Service

I created a simple web service that returns a dataset containing the city
and state when the GetZIP function is called with a zip code as the
parameter. When I test the web service by opening the asmx file I get an
error "System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied."

I am using the same database connection string that my aspx pages do and I
have double checked that it is correct. Is there some special permission
required for an asmx page to access an sql server?

Wayne
Nov 19 '05 #1
2 935
Hi,

Please answer few questions below:

Do the web service is implemented in a different project or in the same web
application?

Do you use windows authentication for connecting to the sql server?

Do you use impersonation in the web application?

If the web service is implemented in a different project and you use windows
authentication and impersonation in the web application, check if you have
enabled the impersonation in the web service application.

--
Saravanan K V
"Wayne Wengert" wrote:
I created a simple web service that returns a dataset containing the city
and state when the GetZIP function is called with a zip code as the
parameter. When I test the web service by opening the asmx file I get an
error "System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied."

I am using the same database connection string that my aspx pages do and I
have double checked that it is correct. Is there some special permission
required for an asmx page to access an sql server?

Wayne

Nov 19 '05 #2

"Saravanan K V" <Sa*********@discussions.microsoft.com> wrote in message
news:EA**********************************@microsof t.com...
Hi,

Please answer few questions below:

Do the web service is implemented in a different project or in the same
web
application? The aspx file is an imdepenent file - not part of the project
Do you use windows authentication for connecting to the sql server? No
Do you use impersonation in the web application? No
If the web service is implemented in a different project and you use
windows
authentication and impersonation in the web application, check if you have
enabled the impersonation in the web service application.

--
Saravanan K V
"Wayne Wengert" wrote:
I created a simple web service that returns a dataset containing the city
and state when the GetZIP function is called with a zip code as the
parameter. When I test the web service by opening the asmx file I get an
error "System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied."

I am using the same database connection string that my aspx pages do and
I
have double checked that it is correct. Is there some special permission
required for an asmx page to access an sql server?

Wayne

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Fraser | last post by:
Hi We are trying to debug a problem with services created using py2exe. It seems that these problems have arisen after services were installed and removed a few times. OK, first the actual...
0
by: David | last post by:
I've written a small windows service, and I'm having a problem that I'm spending a lot more time on than I'd like. If anyone has experienced this problem and has any hints or solutions; they would...
9
by: Sudesh Sawant | last post by:
Hello, We have an application which communicates using remoting. There is a server which is a Windows Service. The server exposes an object which is a singleton. The client is a Web Application...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
by: =?Utf-8?B?aGVsZmk=?= | last post by:
Hi all, I have replied with my own questions to an older post entry but after a while I thought it's better to start a new thread based on the previous one. Perhaps with the new thread I will...
4
by: Dave Burns | last post by:
I am self hosting a Web Service in a Windows service. I am trying to start the service using the NT AUTHORITY\NetworkService account. I get a NullReferenceException on ServiceHost.Open() in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.