0

I had created a web application in my machine and trying to connect to SQL Server using Windows authentication on another machine in the same network. Is it possible way to connect like that?

I saw below link How to connect to SQL Server database using windows authentication remotely? but I don't need to do like that "Providing your windows credentials are added to the server then you should be able to login' instead is it possible to give SQL Server machines user name and password in web.config by adding

<identity impersonate="true" userName="username" password="password"/>
5
  • 1
    A few questions. Are both machines part of a work group or active directory domain? Is the firewall appropriately configured on the machine hosting the sql server? Do you have credentials to log into the machine hosting the SQL server? Commented Nov 8, 2016 at 5:43
  • Are both machines part of a work group or active directory domain? -> Yes Is the firewall appropriately configured on the machine hosting the sql server? -> Yes Do you have credentials to log into the machine hosting the SQL server? -> Yes Commented Nov 8, 2016 at 5:46
  • Have you tried any of these? if so, which ones and what was the result connectionstrings.com/sql-server Commented Nov 8, 2016 at 5:49
  • <authentication mode="Windows"/> <identity impersonate="true" userName="userName" password="password"/> <connectionStrings> <add name="TestConnection" connectionString="data source=192.168.1.114;initial catalog=Alex_Test; integrated security=SSPI; persist security info=False; Trusted_Connection=Yes"/></connectionStrings> Commented Nov 8, 2016 at 7:36
  • my web.config file code is above. So when I gave <authentication mode="Windows"/> this code it not taking global web.config,it is searching in a common folder and saying no proper line of code. So I added web.config in that folder also then I'm getting error It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Commented Nov 8, 2016 at 7:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.