IIS中的发布项目出错 [英] Error in publish project in IIS

查看:49
本文介绍了IIS中的发布项目出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在IIS中发布我的项目但我收到此错误:



发生网络相关或特定于实例的错误建立与SQL Server的连接。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (提供程序:SQL网络接口,错误:50  - 发生本地数据库运行时错误。无法创建自动实例。请参阅Windows应用程序事件日志以获取错误详细信息。





我使用的是SQL Server 2017



我的尝试:



这是我的连接字符串:



< connectionStrings> 
< add name =DefaultConnection

connectionString =Data Source = DESKTOP-LBLR0NH \ SQLEXPRESS; Initial Catalog = aspnet-RES-20190212124018; Integrated Security = False; User Id = Zahra;密码= 12345providerName =System.Data.SqlClient/>


< / connectionStrings>





我试着解决但是不行,我希望任何人帮助我



谢谢你

解决方案

你在本地发布吗?我从来没有把机器名称,我把localhost,因为它至少有点便携。如果你不在本地发布,那是因为数据库不存在


你的数据库连接问题,检查你的连接字符串源,catlog,用户名和密码,如果是web应用程序和sql server在同一台机器上,然后使用localhost或ip地址或简单的单点,检查你的sql实例名称也是

e:g



数据源= 192.168.0.1\SQLEXPRESS 



数据源=(localhost)\ SQLEXPRESS 



数据源=。\SQLEXPRESS 





检查sql server浏览器服务是否运行,使用端口从其他PC访问如果web和sql不同的机器,端口必须用sqlservermanager检查。



端口:数据源= 192.168。 0.1 \ SQLEXPRESS,1443



问候,

Aravind


交叉检查您的数据源。

数据源= 192.168.10.25\SQLServer 


I want to publish my project in IIS but i get this error:

      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: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
) 



I am using SQL Server 2017

What I have tried:

and this is my connection string :

   <connectionStrings>
   <add name="DefaultConnection"

  connectionString="Data Source=DESKTOP-LBLR0NH\SQLEXPRESS;Initial Catalog=aspnet-RES-20190212124018;Integrated Security=False; User Id=Zahra; password=12345" providerName="System.Data.SqlClient" />


</connectionStrings>



I try to solve but it is not work i hope any one help me

Thank you

解决方案

Are you publishing locally? I NEVER put a machine name, I put localhost because it's at least somewhat portable. If you're not publishing locally, it's because the DB doesn't exist there


Hi , problem with ur db connection , check ur connection string source,catlog,username and password,if web application and sql server in same machine, then use localhost or ip address or simply single dot, Check ur sql instance name also
e:g

Data Source=192.168.0.1\SQLEXPRESS


Data Source=(localhost)\SQLEXPRESS


Data Source=.\SQLEXPRESS



Check sql server browser service running or not , use port to access from other pc if web and sql different machine,port must u check with sqlservermanager.

Port : Data Source=192.168.0.1\SQLEXPRESS,1443

Regards,
Aravind


Cross check your Datasource.

Data Source=192.168.10.25\SQLServer


这篇关于IIS中的发布项目出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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