上传到主机时如何允许远程连接? [英] How to allow remote connection when uploading to host?

查看:73
本文介绍了上传到主机时如何允许远程连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System;
using System.Web;
using System.Web.Profile;



public class ProfileCommon : System.Web.Profile.ProfileBase {
    
    public virtual ShoppingCartExample.Cart SCart {
        get {
            return ((ShoppingCartExample.Cart)(this.GetPropertyValue("SCart"))); //<-- I GET AN ERROR HERE//
        }
        set {
            this.SetPropertyValue("SCart", value);
        }
    }
    
    public virtual ProfileCommon GetProfile(string username) {
        return ((ProfileCommon)(ProfileBase.Create(username)));
    }
}







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)

推荐答案

错误非常明显。它无法连接您指定的SQL服务器。检查你的连接字符串。
The error is very clear. It is not able to connect the the SQL server you have specified. Check your connection string.


错误本身暗示了什么。

The error itself suggests something.
引用

找不到服务器或无法访问服务器。验证实例名称是否正确以及SQL Server是否配置为允许远程连接。



因此请检查数据库与应用程序之间的连接,即连接字符串。< br $> b $ b

-KR


So check the connection between your database and your application i.e the connection string.

-KR


这篇关于上传到主机时如何允许远程连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆