Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2005

Tip: Looking for answers? Try searching our database.

Unable to connect to MSSQL...return error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Khamal - 22 Jun 2005 10:09 GMT
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'.

Connection code
--------------
sqlConnection1.ConnectionString = "data source=Khamal;initial
catalog=pofil;integrated security=SSPI;persist security
info=False;workstation id=KHAMAL;packet size=4096"; //(oneline)

:: KHAMAL ::
BillyLiu007 - 22 Jun 2005 11:06 GMT
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" <impersonation> 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.

Signature

Can You?You Can.

> Hello....
> My web service cannot connect to My MsSql DB.
[quoted text clipped - 14 lines]
>
> :: KHAMAL ::
Ragunathan - 23 Jun 2005 10:24 GMT
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.

> 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
[quoted text clipped - 31 lines]
> >
> > :: KHAMAL ::

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.