简体   繁体   English

如何将ASP.NET项目放入IIS

[英]how to put ASP.NET project to IIS

I developed a asp.net project. 我开发了一个asp.net项目。 it is connecting visual studio 2010 in the temprary server of visual studio 2010 but when I put it to the iis it does not conect. 它在Visual Studio 2010的临时服务器中连接Visual Studio 2010,但是当我将它放到iis时,它并没有连接。 Please how can pix this matter ? 请怎么能解决这个问题? my web.config is like that; 我的web.config就是这样;

<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
    <compilation debug="true" targetFramework="4.0">
        <assemblies>
            <add assembly="System.Design, Version=4.0.0.0,      Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
</system.web>

<connectionStrings>
 <add name="ConnectionString"
 connectionString="Server=SRV-WORKFLOW; Database=PTC;User ID =   MIKES\EMREAL;Password=EMAL5616.;Trusted_Connection=True;"
  providerName="System.Data.SqlClient"  />

 <add name ="PTCconnection"
  connectionString="Server=SRV-PLM; Database=wcadmin;User ID = MIKES\EMREAL;Password=EMAL5616.;Trusted_Connection=True;"
   providerName="System.Data.SqlClient"   />




 </connectionStrings>



</configuration>

You are using Trusted_Connection=True which means it tries to connect to your database with the credentials from the user the apps runs under. 您正在使用Trusted_Connection=True ,这意味着它将尝试使用运行应用程序的用户的凭据尝试连接到数据库。 In the case of IIS, it's normally an AppPool user. 对于IIS,通常是AppPool用户。 Either allow this user access to the database, change the app pool user or use SQL Server authentication. 允许该用户访问数据库,更改应用程序池用户或使用SQL Server身份验证。

You can get an overview of connectionstrings here : http://connectionstrings.com/ 您可以在此处获得连接字符串的概述: http : //connectionstrings.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM