Showing posts with label connecto. Show all posts
Showing posts with label connecto. Show all posts

Sunday, March 25, 2012

Connecto to remote SQL Server

Hi, community

I want to connect a program (like query analyzer) in home, to the sql server in office via internet, but i can't log in to the remote server. Someone know how to establish the connection?

Thanks to all of you!!!You will need to get permission from you network group to VPN into the network.|||thank you, but can you be a little more detailed?|||You need to talk to your network group and have them give you VPN access and tell you how to use it.|||I've tryed lot of things but cant connect!!!!, i try to establish a VPN in win 2k3 server as Server and winXP Prof as client, but it is impossible to get connected!!!

I finally get the VPN connection, i've missing directives, but now i cant connect to SQL Server!

connecto to Database

Hello

i was tring to a connecto to a database but i have always this erros

Message 4 Impossible to find the informations the element for the schema 'http://schemas.microsoft.com/.NetConfiguration/v2.0:add'.

Message 2 Impossible to find the informations the element for the schemat 'http://schemas.microsoft.com/.NetConfiguration/v2.0:appSettings'.

Message 3 Impossible to find the informations the element for the schema 'http://schemas.microsoft.com/.NetConfiguration/v2.0:connectionStrings'.

Message 4 Impossible to find the informations the element for the schema 'http://schemas.microsoft.com/.NetConfiguration/v2.0:add'.


my code

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="DatabaseConnection" connectionString="Persist Security Info=False;Integrated Security=SSPI;database=MyDatabase;server=(localhost);" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true"/>
<authentication mode="Windows"/>
-->
</system.web>
</configuration>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class application : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
Connect_to_bdd();
}

protected void Connect_to_bdd()
{
ConnectionStringSettings settings;
settings = ConfigurationManager.ConnectionStrings["DatabaseConnection"];
if (settings != null)
{
Console.WriteLine(settings.ConnectionString);
}
else
{
try
{
SqlConnection oConnection = new SqlConnection(settings);
oConnection.Open();
Console.WriteLine("Etal de la connection" + oConnection.State);
oConnection.Close();
}
catch (Exception e)
{

Console.WriteLine("L'erreur suivante a été rencontrée:" + e.Message);
}
}
}
}

Thanks for help

Hi Bolo,

It seems that your IIS settings hasn't been updated to version 2.0 .

You may enter the folderC:\WINDOWS\Microsoft.NET\Framework\v2.0.50215 in DOS mode and run "aspnet_regiis.exe -i ".

If this does not answer your question, pls feel free to reply. Thanks!

|||

Hello,

i tested but i have always same message :(

regards