SQL does not work on another device after publishing to the web

2

Why can not my page run queries to the bank when it is published on the web and being used from other devices (networked computers and smartphone)?

If I use the computer itself (server), I can access it normally. Would it be any SQL Server configuration that is barring access?

The server runs on Windows 7 (IIS 7) SQL Server 2008 RC2

connectionStrings: 
name="conexao" connectionString="server=192.168.1.110\DIEGO-PC,1433;;database=corretor;Integrated Security=True;"

Remembering that all devices are on the same network.

    
asked by anonymous 11.05.2014 / 17:57

1 answer

0

First, it is generally not good practice to give direct access to the database on a mobile phone, unless you have a very peculiar problem to solve. Ideally, the mobile phone should access a service on the network. This service would be hosted on a server with database access.

Otherwise - you're using integrated Windows security (% with%). There is a fairly high probability (I would say 99.999 plus a few percent chance) that the user logged in to his cell phone is not the same user logged on to the PC . I would even say that if it's an iPhone, you're signed in with an Apple account, and if it's Android, the user logs in to Google, Facebook or some other identity provider.

If you really want to log into the database with the phone (and I repeat that this is generally not recommended), you need to use another security scheme, such as one that asks for username and password. You need to configure the bank to accept authentication other than the one integrated with Windows, and need to pass the username and password in the connection string.

Also make sure that the mobile can reach the server over the network. Even if it is on the same network, the connection may be denied due to its settings (ie: firewall blocking port 1433 - your PC may not have this problem because it is the server itself - cellular not being part of the domain / workgroup etc.) .

    
11.05.2014 / 20:17