在数据库里建立一个叫DotNetNuke的库, 然后解压DotNetNuke_04.07.00_Install.zip,文件夹设置成虚拟站点。打开目录下的web.config文件 <connectionStrings> <!-- Connection String for SQL Server 2005 Express <add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient" />--> <!-- Connection String for SQL Server 2000/2005--> <add name="SiteSqlServer" connectionString="Data Source=(local);Initial Catalog=DotNetNuke;User ID=dnn;Password=dnn" providerName="System.Data.SqlClient" /> </connectionStrings>把上面的那个for SQL Server 2005 Express 的地方注释掉,把下面的注释去掉。一共两个地方 <appSettings> <!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules <add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>--> <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules--> <add key="SiteSqlServer" value="Data Source=(local);Initial Catalog=DotNetNuke;User ID=dnn;Password=dnn" />这个地方也这样操作。然后再dotnetnuke的文件上设置aspnet的控制权限。web.config只读设置去掉,然后运行站点,按照提示操作,一切ok
数据库已经配置好了,可是一运行项目就出现如下错误: Domain Name localhost/DotNetNuck_2 Does Not Exist In The Database DotNetNuke supports multiple portals from a single database/codebase. It accomplishes this by converting the URL of the client browser Request to a valid PortalID in the Portals database table. The following steps describe the process: Web Server ProcessingWhen a web server receives a Request from a client browser, it compares the file name extension on the target URL resource to its Application Extension Mappings defined in IIS. Based on the corresponding match, IIS then sends the Request to the defined Executable Path ( aspnet_asapi.dll in the case of ASP.NET Requests ). The aspnet_isapi.dll engine processes the Request in an ordered series of events beginning with Application_BeginRequest. HttpModule.URLRewrite OnBeginRequest ( UrlRewriteModule.vb )The Request URL is parsed based on the "/" character A Domain Name is constructed using each of the relevant parsed URL segments. Examples: URL: http://www.domain.com/default.aspx = Domain Name: www.domain.com URL: http://209.75.24.131/default.aspx = Domain Name: 209.75.24.131 URL: http://localhost/DotNetNuke/default.aspx = Domain Name: localhost/DotNetNuke URL: http://www.domain.com/virtualdirectory/default.aspx = Domain Name: www.domain.com/virtualdirectory URL: http://www.domain.com/directory/default.aspx = Domain Name: www.domain.com/directory Using the Domain Name, the application queries the database ( Portals table - PortalAlias field ) to locate a matching record. Note: If there are multiple URLs which correspond to the same portal then the PortalAlias field must contain each valid Domain Name in a comma seperated list. Example: URL: http://localhost/DotNetNuke/default.aspx URL: http://MACHINENAME/DotNetNuke/default.aspx URL: http://209.32.134.65/DotNetNuke/default.aspx PortalAlias: localhost/DotNetNuke,MACHINENAME/DotNetNuke,209.32.134.65/DotNetNuke Note: If you are installing the application to a remote server you must modify the PortalAlias field value for the default record in the Portals table according to the rules defined above. Return to Site
Jileiting888, 根据你给的提示信息Domain Name localhost/DotNetNuck_2 Does Not Exist In The Database 打开DotNetNuke数据库中,选择表dbo.dnn_PortalAlias表,里面的HttpAlias默认值是localhost/dotnetnuke,你把它修改为你的localhost/DotNetNuke_2看一下。
然后解压DotNetNuke_04.07.00_Install.zip,文件夹设置成虚拟站点。打开目录下的web.config文件
<connectionStrings>
<!-- Connection String for SQL Server 2005 Express
<add
name="SiteSqlServer"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"
providerName="System.Data.SqlClient" />-->
<!-- Connection String for SQL Server 2000/2005-->
<add name="SiteSqlServer" connectionString="Data Source=(local);Initial Catalog=DotNetNuke;User ID=dnn;Password=dnn" providerName="System.Data.SqlClient" />
</connectionStrings>把上面的那个for SQL Server 2005 Express 的地方注释掉,把下面的注释去掉。一共两个地方
<appSettings>
<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules
<add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>-->
<!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules-->
<add key="SiteSqlServer" value="Data Source=(local);Initial Catalog=DotNetNuke;User ID=dnn;Password=dnn" />这个地方也这样操作。然后再dotnetnuke的文件上设置aspnet的控制权限。web.config只读设置去掉,然后运行站点,按照提示操作,一切ok
Domain Name localhost/DotNetNuck_2 Does Not Exist In The Database DotNetNuke supports multiple portals from a single database/codebase. It accomplishes this by converting the URL of the client browser Request to a valid PortalID in the Portals database table. The following steps describe the process:
Web Server ProcessingWhen a web server receives a Request from a client browser, it compares the file name extension on the target URL resource to its Application Extension Mappings defined in IIS.
Based on the corresponding match, IIS then sends the Request to the defined Executable Path ( aspnet_asapi.dll in the case of ASP.NET Requests ).
The aspnet_isapi.dll engine processes the Request in an ordered series of events beginning with Application_BeginRequest. HttpModule.URLRewrite OnBeginRequest ( UrlRewriteModule.vb )The Request URL is parsed based on the "/" character
A Domain Name is constructed using each of the relevant parsed URL segments. Examples: URL: http://www.domain.com/default.aspx = Domain Name: www.domain.com
URL: http://209.75.24.131/default.aspx = Domain Name: 209.75.24.131
URL: http://localhost/DotNetNuke/default.aspx = Domain Name: localhost/DotNetNuke
URL: http://www.domain.com/virtualdirectory/default.aspx = Domain Name: www.domain.com/virtualdirectory
URL: http://www.domain.com/directory/default.aspx = Domain Name: www.domain.com/directory
Using the Domain Name, the application queries the database ( Portals table - PortalAlias field ) to locate a matching record. Note: If there are multiple URLs which correspond to the same portal then the PortalAlias field must contain each valid Domain Name in a comma seperated list. Example: URL: http://localhost/DotNetNuke/default.aspx
URL: http://MACHINENAME/DotNetNuke/default.aspx
URL: http://209.32.134.65/DotNetNuke/default.aspx
PortalAlias: localhost/DotNetNuke,MACHINENAME/DotNetNuke,209.32.134.65/DotNetNuke Note: If you are installing the application to a remote server you must modify the PortalAlias field value for the default record in the Portals table according to the rules defined above.
Return to Site
打开DotNetNuke数据库中,选择表dbo.dnn_PortalAlias表,里面的HttpAlias默认值是localhost/dotnetnuke,你把它修改为你的localhost/DotNetNuke_2看一下。