在iis上上传一个asp [英] upload a asp sit on iis
问题描述
嗨.
我用C#在asp.net的Visual stadio 2010中找到了一个站点.我的系统上装有Microsoft SQLSERVER 2008,操作系统是win7.我的系统上也安装了vis 2010的SQLEXPRESS.
首先,我的数据库在SQLSERVER 2008上.
因此我将数据库文件携带到我的asp解决方案中的APP_DATA文件夹中,并自动附加到sqlexpress.
我尝试使用iis,但无法连接数据库,无法打开页面,但数据库无法正常工作.此错误是在我的浏览器中创建的:
由于无法检索用户的本地应用程序数据路径而未能生成SQL Server用户实例.请确保用户在计算机上具有本地用户配置文件.连接将被关闭."
我该如何解决这个问题?
而我在web.config中的连接字符串是:
hi.
i have wite a site in visual stadio 2010 with asp.net with C#. i have a Microsoft SQLSERVER 2008 on my system and my os is win7.also the SQLEXPRESS of vis 2010 is installed on my system.
firstly my database was on SQLSERVER 2008.
so i carry my database file to APP_DATA folder in my asp solution and attach automaticly to sqlexpress.
i try use my sit on iis but can not connect database,pages is opend but database not work.and this error is created on my browser:
"Failed to generate a user instance of SQL Server due to failure in retrieving the user''s local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed."
how can i solve this problem?
and my connection string in web.config is:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="Porpos_webConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Porpos_web.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient">
</connectionStrings>
推荐答案
您必须阅读以下内容:
在IIS 7.0上部署ASP.NET网站 [ ^ ]
http://msdn.microsoft.com/en-us/library/1y1404zt (v = vs.80).aspx [ http://www.asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-deploying- to-iis-as-a-test-environment-12 of 5 [
You must read these:
Deploying ASP.NET Websites on IIS 7.0 [^]
http://msdn.microsoft.com/en-us/library/1y1404zt(v=vs.80).aspx[^]
http://www.asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-deploying-to-iis-as-a-test-environment-5-of-12[^]
Verify that you have Porpos_web.mdf in your App_Data folder.
Hope it helps.
这篇关于在iis上上传一个asp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!