Jump to content


augustofernandes

Member Since 18/10/2010
Offline Last Active 24/10/2010, 19:38
-----

Topics I've Started

Script Conexão Sql Server

21/10/2010, 08:45

Boa noite a todos,

Fiz minha primeira aplicação para rodar via web utilizando VWD e banco de dados SQL SERVER EXPRESS.
Ocorre que quando tento acessar o banco de dados pelo site, informa erro 26, conforme abaixo.

“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)”

Fiz algumas pesquisas e vi que preciso inserir um script no web.config para que o banco de dados funcione estando no servidor de hospedagem
Tenho 2 duvidas:

1) como seria esse script e onde inserir ele no web.config ?

2) tenho que acrescentar esse script e retirar o que permite acesso local/computador, ou posso deixar os dois ?

Fico sem saber se ao colocar o script para acessar remotamente se vou conseguir continuar trabalhando/desenvolvendo no computado local.

Favor, quem tiver qualquer tipo de ajuda será muito bem vindo.

Obrigado e abraço a todos
Octávio Augusto

IPB Skin By Virteq