开发者

how to install asp.net kigg starter kit?

I am trying to install kigg starter kit on my local machine.

I download the KiGG v3.0 Source Code from here: http://kigg.codeplex.com/releases/view/53838

First when I try to run/re-built the project I get 3 error messages like this:

Error    101    The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' and 'c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll'    c:\Documents and Settings\Desktop\Kigg\Kigg_3a9b436eace5\Source\Web\Views\Membership\Detail.aspx    21    Kigg.Web
Error    102    The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' and 'c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll'    c:\Documents and Settings\Desktop\Kigg\Kigg_3a9b436eace5\Source\Web\Views\Membership\Detail.aspx    27    Kigg.Web
Error    103    The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' and 'c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll'    c:\Documents and Settings\Desktop\Kigg\Kigg_3a9b436eace5\Source\Web\Views\Membership\Detail.aspx    34    Kigg.Web

Still when I try to run the project I get this error:

Line 43:         }
Line 44: 
Line 45: public Database(string connectionString) :
Line 46:             base(connectionString, _defaultContainerName)
Line 47:         {   

I follow this solution: http://kigg.codeplex.com/discussions/236299

and copied following files from "Views/shared files" to "App_Data"

Now the error changed to this:

An attempt to attach an auto-named database for file C:\Documents and Settings\Desktop\Kigg\Kigg_3a9b436eace5\Source\Web\App_Data\KiGG.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Description: An unhandled exception occurred during the execution of the current web request. Ple开发者_如何学编程ase review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Documents and Settings\NA-PC\Desktop\Kigg\Kigg_3a9b436eace5\Source\Web\App_Data\KiGG.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Source Error:

Line 92:             Check.Argument.IsNotEmpty(userName, "userName");
Line 93:             
Line 94: return DataContext != null ? FindByUserNameQuery.Invoke(DataContext, userName.Trim()) : Database.UserDataSource.FirstOrDefault(u => u.UserName == userName.Trim());
Line 95:         }
Line 96

I created a database using SSMS and this is my connection string

<connectionStrings>
    <clear />
    <add name="KiGGDatabase" connectionString="Data Source=.\SQLEXPRESS;AttachDbFileName=|DataDirectory|KiGG.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />
  </connectionStrings>

(I want to install kigg on my local machine)

I followed these steps to create database http://kigg.codeplex.com/releases/view/53838

PLEASE HELP


To solve the first 3 errors: http://connect.microsoft.com/VisualStudio/feedback/details/557798/visual-studio-2010-compile-asp-net-3-5-website-using-net4s-aspnet-compiler-exe


open the file Kigg.Web.csproj

search for AspNetCompiler, you will find it here

<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\Web" />
</Target> 

added the Tool Path parameter to be like

<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\Web" 
ToolPath="C:\Windows\Microsoft.NET\Framework\v2.0.50727"/>
</Target> 

for the database error change the connection string from

<add name="KiGGDatabase" connectionString="Data Source=.\SQLEXPRESS;AttachDbFileName=|DataDirectory|KiGG.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />

to

<add name="KiGGDatabase" connectionString="Data Source=.\SQLEXPRESS;Database=KiGG;Integrated Security=True;User Instance=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜