Not able to connect from Web server to SQl Server....

  • Hi,

    I am Vishal Prajapati from Extentia Information Technology Pvt. Ltd.

    We are having one system (OS windows 2000)  on which Sql Server 2000 is installed....

    Another system (OS windows 2000) is a Web Server... having .Net Framework 1.1 installed....

    Now when client make a Login request through Application I want the request to go to Web Server and at Web Server the login should be authenticated (Windows authentication) by connecting it to the Sql Server installed on another System....

    I haved tried to connect it but getting following error: "System.Security.SecurityException: Requested registry access is not allowed"

     

     


    Kindest Regards,

    Vishal Prajapati

    DBA at Extentia Infromation Technology

  • Hi Vishal,

    This sounds like a problem with the Web application configuration user account that is trying to access SQL Server. In the Web.config file for the application there is probably an entry under <system.web> which is something like:- 

    <identity impersonate="true" userName="registry:HKLM\SOFTWARE\MyProgramKey\identity\ASPNET_SETREG,userName"

     password="registry:HKLM\SOFTWARE\MyProgramKey\identity\ASPNET_SETREG,password" />

    which means that that the identity which is going to be used for accessing SQL Server has to be retrieved from the registry.

    I am guessing you are trying to run this in your development environment and, in your set up, your web app can't read your registry hence the error but if it did you probably haven't set up the user account details anyway so you still wouldn't get access. You can change this entry so you have the username and password set to a valid domain user account that has access to SQL Server something like

    <identity impersonate="true" userName="MyDomain\sqlUser password="password"\>

    not very secure for real environments but gets you by in development.

    hope that helps

    Mandy

    Senior Application Developer

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply