473,800 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to connect to MSSQL...return error

Hello....
My web service cannot connect to My MsSql DB.

error message...
----------------------
An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException'
occurred in system.web.serv ices.dll

Additional information: Server was unable to process request. --> Login
failed for user 'KHAMAL\ASPNET' .

Connection code
--------------
sqlConnection1. ConnectionStrin g = "data source=Khamal;i nitial
catalog=pofil;i ntegrated security=SSPI;p ersist security
info=False;work station id=KHAMAL;packe t size=4096"; //(oneline)

:: KHAMAL ::
Nov 23 '05 #1
4 4818
U SQL is using the windows integration security , but your web service is
running under the ASPNEt account, which may not have the access permission to
the DB by default.

In order to solve the problem, you can either:
1. Use mixed security mode in sql server, create a new sql db account, use
it in your connection string
2. Use Impersonation, to impersonate to a windows account which have the
privilage to access the sql.
3. Give the SQL access permission to ASPNET account or NEtworkService
account if you are running under win2k3. (not recommened)

Please note , when u use impersonation, dont "hard code" <impersonatio n> in
the web.config and make the web service alwasys run under that account.
instead. write some code, just temporaly enable the impersonation when you
doing the DB connection.

--
Can You?You Can.
"Khamal" wrote:
Hello....
My web service cannot connect to My MsSql DB.

error message...
----------------------
An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException'
occurred in system.web.serv ices.dll

Additional information: Server was unable to process request. --> Login
failed for user 'KHAMAL\ASPNET' .

Connection code
--------------
sqlConnection1. ConnectionStrin g = "data source=Khamal;i nitial
catalog=pofil;i ntegrated security=SSPI;p ersist security
info=False;work station id=KHAMAL;packe t size=4096"; //(oneline)

:: KHAMAL ::

Nov 23 '05 #2
U SQL is using the windows integration security , but your web service is
running under the ASPNEt account, which may not have the access permission to
the DB by default.

In order to solve the problem, you can either:
1. Use mixed security mode in sql server, create a new sql db account, use
it in your connection string
2. Use Impersonation, to impersonate to a windows account which have the
privilage to access the sql.
3. Give the SQL access permission to ASPNET account or NEtworkService
account if you are running under win2k3. (not recommened)

Please note , when u use impersonation, dont "hard code" <impersonatio n> in
the web.config and make the web service alwasys run under that account.
instead. write some code, just temporaly enable the impersonation when you
doing the DB connection.

--
Can You?You Can.
"Khamal" wrote:
Hello....
My web service cannot connect to My MsSql DB.

error message...
----------------------
An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException'
occurred in system.web.serv ices.dll

Additional information: Server was unable to process request. --> Login
failed for user 'KHAMAL\ASPNET' .

Connection code
--------------
sqlConnection1. ConnectionStrin g = "data source=Khamal;i nitial
catalog=pofil;i ntegrated security=SSPI;p ersist security
info=False;work station id=KHAMAL;packe t size=4096"; //(oneline)

:: KHAMAL ::

Nov 23 '05 #3
Hi Khamal,
Instead of changing the database to mixed mode, you can remove the
anonymous check in webservice. That would solve the problem.

Thanks,
Ragu.
"BillyLiu00 7" wrote:
U SQL is using the windows integration security , but your web service is
running under the ASPNEt account, which may not have the access permission to
the DB by default.

In order to solve the problem, you can either:
1. Use mixed security mode in sql server, create a new sql db account, use
it in your connection string
2. Use Impersonation, to impersonate to a windows account which have the
privilage to access the sql.
3. Give the SQL access permission to ASPNET account or NEtworkService
account if you are running under win2k3. (not recommened)

Please note , when u use impersonation, dont "hard code" <impersonatio n> in
the web.config and make the web service alwasys run under that account.
instead. write some code, just temporaly enable the impersonation when you
doing the DB connection.

--
Can You?You Can.
"Khamal" wrote:
Hello....
My web service cannot connect to My MsSql DB.

error message...
----------------------
An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException'
occurred in system.web.serv ices.dll

Additional information: Server was unable to process request. --> Login
failed for user 'KHAMAL\ASPNET' .

Connection code
--------------
sqlConnection1. ConnectionStrin g = "data source=Khamal;i nitial
catalog=pofil;i ntegrated security=SSPI;p ersist security
info=False;work station id=KHAMAL;packe t size=4096"; //(oneline)

:: KHAMAL ::

Nov 23 '05 #4
Hi Khamal,
Instead of changing the database to mixed mode, you can remove the
anonymous check in webservice. That would solve the problem.

Thanks,
Ragu.
"BillyLiu00 7" wrote:
U SQL is using the windows integration security , but your web service is
running under the ASPNEt account, which may not have the access permission to
the DB by default.

In order to solve the problem, you can either:
1. Use mixed security mode in sql server, create a new sql db account, use
it in your connection string
2. Use Impersonation, to impersonate to a windows account which have the
privilage to access the sql.
3. Give the SQL access permission to ASPNET account or NEtworkService
account if you are running under win2k3. (not recommened)

Please note , when u use impersonation, dont "hard code" <impersonatio n> in
the web.config and make the web service alwasys run under that account.
instead. write some code, just temporaly enable the impersonation when you
doing the DB connection.

--
Can You?You Can.
"Khamal" wrote:
Hello....
My web service cannot connect to My MsSql DB.

error message...
----------------------
An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException'
occurred in system.web.serv ices.dll

Additional information: Server was unable to process request. --> Login
failed for user 'KHAMAL\ASPNET' .

Connection code
--------------
sqlConnection1. ConnectionStrin g = "data source=Khamal;i nitial
catalog=pofil;i ntegrated security=SSPI;p ersist security
info=False;work station id=KHAMAL;packe t size=4096"; //(oneline)

:: KHAMAL ::

Nov 23 '05 #5

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

Similar topics

1
11200
by: EricP | last post by:
Hello, First, sorry for my bad English. Here is my problem: BoxA: XPpro + Apache + php (using php_mssql.php)+ ADOdb + MS SQL Server + My_Prog (using local MS SQL PUBS database) BoxB: NT4 + Apache + php (using php_mssql.php)+ ADOdb + My_Prog (using
2
1464
by: Anilkumar | last post by:
H friends I have a strange problem. i am trying to connect to my sqlserver from client machine to server machine But i am not able to connect to the server from the client machine. The strange thing is that i am able to connect through Named Pipes but not with TCP/IP and i get error SQL Server doesnot exit or access denied.
0
2287
by: vicky | last post by:
Hello Experts, Trying to run sample Postgrel's ECPG(Embedded SQL)programs on RHL 9.0. Im unable to connect to PostgreSQL database (sirishadb) when I run the program .... # su postgres (enter)
1
19984
by: Antonello Calabrò | last post by:
Hi all, I created a webservice that execute a sql query on demand. If I try to execute the query from the WebForm, all is ok. If I try to execute the query from a normal Windows Application, all is ok. The WebService run correctly.. but if I try to call the Webservice from a SmartDeviceApplication the program crash and the debug message is:
0
259
by: Khamal | last post by:
Hello.... My web service cannot connect to My MsSql DB. error message... ---------------------- An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll Additional information: Server was unable to process request. --> Login failed for user 'KHAMAL\ASPNET'.
4
20274
by: aryan2cool | last post by:
hii all i am using php 5 and a warning has occured in my application " Warning: mssql_connect() : message: Login failed for user 'PAYDATA'. (severity 14) in C:\WINNT\Temp\tmpqjqokj.php on line 7 Warning: mssql_connect() : Unable to connect to server: 10.23.80.6 in C:\WINNT\Temp\tmpqjqokj.php on line 7"
1
2413
by: Markw | last post by:
Hi folks I think I've got a variable problem but not 100% sure. Background: I took the CMS example from chapter 6 in "Build your Own Database Driven Website Using PHP&MySQL" and have attempted to modify it for use in my own database. It almost works for me LOL. contact.php returns my dive buddies first and last name and gives me the option to either Edit or Delete them. Currently the delete option is not active. When I choose to edit...
0
2481
by: dreamer247 | last post by:
hii all i am working with mssql 2000 and after restoring a databas from device the warning is .. Warning: mssql_connect() : message: Cannot open user default database. Using master database instead. (severity 11) in C:\WINDOWS\Temp\tmpk50gud.php on line 11 Warning: mssql_select_db() : message: Server user 'cms' is not a valid user in database 'cms'. (severity 14) in C:\WINDOWS\Temp\tmpk50gud.php on line 21 Warning:...
2
3822
by: yashiro | last post by:
Hello , i am moving my server (php,apache (wamp 2c)) to a new machine. while executing my php file ,i get the warning : Warning : mssql_connect() : unable to connect to server ..... i dont understand why. Because am running the same script on the old machine and its working. i think i forget to something in php.ini which kind of setting did i forget?
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10504
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10274
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.