Re: SQL Server problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



This isn't an ASP.NET permissions issue, since you are not using integrated
security.

Try putting the datasource as "domain\testdb" for the machine name.

"Torsjon" <torshavn@xxxxxxxxx> wrote in message
news:1116926071.778033.34010@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I have created a simple web application using ASP.NET, which queries an
> SQL-Server database, but every time the application is run, I get the
> following error: (truncated for brevity)
>
> Exception Details: System.Data.SqlClient.SqlException: SQL Server does
> not
> exist or access denied.
>
> Relevant code is here:
>
> string strConnection = "Data Source=testdb;Initial
> Catalog=testdatabase;User Id=testuser;Password=testpassword;";
> dbConn = new SqlConnection(strConnection);
> dbConn.Open();
> strSQL = "SELECT Title, ISBN, Publisher " +
> "FROM BOOK " +
> "ORDER BY Title";
>
> dbCmd = new SqlCommand(strSQL, dbConn);
> dbReader = dbCmd.ExecuteReader();
>
> dgQuick.DataSource = dbReader;
> dgQuick.DataBind();
>
> My setup is as follows:
>
> IIS 5 webserver running on Windows XP
> Database server is Microsoft SQL-Server 2000, running on Windows Server
> 2003 Enterprise
>
> (These two servers are in seperate Windows domains)
>
> The really odd thing is that I can connect just fine using the same
> connection information in Query Analyzer running on the same machine as
> the web server.
>
> What I'm thinking is that most likely the ASP.NET worker process
> running on the web server does not have the proper access rights for
> accessing the database server. I'm not especially knowledgeable about
> the security model on Windows 2003 server, so this is just a guess.
>
> Anyone got any suggestions?
>


.



Relevant Pages

  • SecurityFocus Microsoft Newsletter #164
    ... Got Storage Security Risks? ... MICROSOFT VULNERABILITY SUMMARY ... Chat Client FTP Server Default Username Credential Weak... ... NetServe Web Server is a compact web server for Microsoft Windows ...
    (Focus-Microsoft)
  • Re: im being held in memory
    ... How can I harden my computer or server to secure it from hackers? ... Use firewall software and hardware and antivirus software that is ... Follow the instructions for hardening Windows and IIS at ... Install all service packs and security fixes from Microsoft and otherwise ...
    (microsoft.public.security)
  • SecurityFocus Microsoft Newsletter #167
    ... MICROSOFT VULNERABILITY SUMMARY ... Multiple Vendor XML Parser SOAP Server Denial Of Service Vul... ... Proactive Windows Security Explorer ...
    (Focus-Microsoft)
  • MS and security: good effort but no cigar
    ... build upon the progress it's already made in security. ... The low-hanging fruit of millions of insecure Windows machines ... Then there's the issue of poorly secured server applications. ... and execute external virus and filtering ...
    (microsoft.public.windowsxp.general)
  • Re: Group Policy broke my DCs
    ... to be very careful with tweaking services on domain controllers. ... Group Policy - security policy at the OU level which makes it much easier to ... complied from the Windows 2003 Server Security guide for baseline core ... Server - automatic ...
    (microsoft.public.windows.group_policy)