2015-07-02 42 views
0

我想从我的桌面在本地网络上部署ASP.NET。 我已完成所有IIS步骤,并且在登录页面上打开网站。 但每次我尝试登录时,都会收到此错误消息。ASP .NET本地部署 - 无法访问数据库

Server Error in '/MReserve' Application. 

The network path was not found 

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.ComponentModel.Win32Exception: The network path was not found 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 

[Win32Exception (0x80004005): The network path was not found] 

这是我从发布配置文件生成的连接字符串。

<add name="DefaultConnection" connectionString="Data Source=|DataDirectory|aspnet-MReserve-20150516063047.mdf; Initial Catalog=aspnet-MReserve-20150516063047;Integrated Security=False; MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /> 
<add name="MReserve.Models.MReserveDB" connectionString="Data Source=|DataDirectory|MReserveDB.mdf; Initial Catalog=MReserveDB; Integrated Security=False; MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" /> 
<add name="MReserve.Models.MReserveDB_DatabasePublish" connectionString="Data Source=|DataDirectory|MReserveDB.mdf; Initial Catalog=MReserveDB; Integrated Security=False; MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /> 

请你帮我解决这个问题。 我已经启用防火墙的INBOUND规则:TCP/IP连接和万维网。

+0

什么你意味着什么“部署本地网络上“?你想将它安装在本地服务器上?或只是让它访问的LAN,但驻留在您的电脑?你尝试调试吗? – Paolo

+0

我试图通过近50个桌面的本地网络来运行应用程序。 我为Service Pack 1和调试安装,这是现在的错误信息出现: “附加信息:在数据库中创建‘主’否认DATABASE权限” – NNabil

+0

检查在web.config中的连接字符串,并检查泰德的您在那里设置的用户有足够的权限来创建数据库。 – Paolo

回答

0

通过使这些防火墙入站规则解决: 1)SQL端口(1433) 2)网络万维网 3)IIS快递(本地端口:80)