Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6595569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:57:24+00:00 2026-05-25T17:57:24+00:00

Working in VWD 2010 Express I have an aspx.vb file with the following connection

  • 0

Working in VWD 2010 Express

I have an aspx.vb file with the following connection string:

   Protected Function getPasswordLength() As Integer
        Dim conn As New SqlConnection("Data Source=localhost;database=MyDB;Integrated Security=true")
        Dim cmd As SqlCommand = conn.CreateCommand()

        cmd.CommandText = "select dbo.getPWLen() ;"
        conn.Open()
        getPasswordLength = CInt(cmd.ExecuteScalar())
        conn.Close()

    End Function

This works when the code is on the web server / which is collocated with the SQLServer.
However, when I want to debug, I have to copy to the server. I would like to be able to “debug in place” on my development machine and only copy files to the production machine periodically. Technically the production machine is not in production at the moment, but that’s beside the point.

Anyway, I followed the following instruction: http://weblogs.asp.net/nannettethacker/archive/2008/02/17/creating-a-database-connection-to-a-remote-sql-server-database-within-visual-web-developer.aspx

I can now see the remote database, functions, etc. on the other machine (from the VWD running on the development machine).

However, I thought I should then be able to execute this same code locally on the development machine using ctrl-F5, but I get the following error:

—
**Server Error in ‘/’ Application.

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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)**

Should what I’m doing be possible? If so, any ideas what I’m doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:57:25+00:00Added an answer on May 25, 2026 at 5:57 pm

    Make sure your SQL Server is configured to accept remote connections.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working in iOS 5 I have read a list of file names from my
Working with Sharepoint 2010, I have a class that inherits SPPersistedObject with various settings:
Working on Learn Python the Hard Way exercise 47 and I have the following
Working with an undisclosed API, I found a function that can set the number
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with cakePHP this is my situation: I have Users and Order s. Order
Working on outputting either a real number or integer number i'm reading in a
Working on dom html . I want to convert node value to string: $html
Working with a Lucene index, I have a standard document format that looks something
Working in Java: I have a JFrame class, and separate classes for my two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.