how to install asp.net kigg starter kit ?

Aug 29, 2011 at 4:22 PM

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. Please 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

Aug 30, 2011 at 10:08 PM

Those are just simple error messages :). I've dealt with them but under VS 2010 and .NET 4. I'don't know and now have time to verify if that's make any difference.

The first one says that you (probably) have ASP.NET MVC 3.5 and 4 installed and KiGG doesn't know which one to use. The solution is here: http://kigg.codeplex.com/discussions/210582. Have you tried this?
I'm not sure if this helped in my case, but if it don't let me know I will try to check what helped.

The second one is because you haven't correctly configured connection string for Unity. Open your web.config and search for <type type="IConnectionString" mapTo="ConnectionString">

You will see a comment there to put your connection string name. Something like <!--Database Connection String Name -->. Put there KiGGDatabase. So it should be as:

<param name="name" parameterType="System.String">
    <value type="System.String" value="KiGGDatabase"/>
    <!--Database Connection String Name -->
</param>

But if you haven't change it then you probably haven't configured other stuff. Go though web.config a set this project correctly.

I don't think you should move DB do App_Data and run KiGG with attached DB. I think it works bets with full MS SQL (or Express) but I will leave that for you to decide.

Regards,
Pawel
http://dotnetomaniak.pl

Aug 31, 2011 at 6:36 AM

I also encountered the same problem!!

Coordinator
Sep 1, 2011 at 3:11 PM

Any updates regarding this issue!

For some reason I'm not able to reproduce it on my 2 local machines! :( So thought to ask if it is resolved for you

Sep 9, 2011 at 8:39 PM
pawlos wrote:

Those are just simple error messages :). I've dealt with them but under VS 2010 and .NET 4. I'don't know and now have time to verify if that's make any difference.

The first one says that you (probably) have ASP.NET MVC 3.5 and 4 installed and KiGG doesn't know which one to use. The solution is here: http://kigg.codeplex.com/discussions/210582. Have you tried this?
I'm not sure if this helped in my case, but if it don't let me know I will try to check what helped.

The second one is because you haven't correctly configured connection string for Unity. Open your web.config and search for <type type="IConnectionString" mapTo="ConnectionString">

You will see a comment there to put your connection string name. Something like <!--Database Connection String Name -->. Put there KiGGDatabase. So it should be as:

<param name="name" parameterType="System.String">
    <value type="System.String" value="KiGGDatabase"/>
    <!--Database Connection String Name -->
</param>

But if you haven't change it then you probably haven't configured other stuff. Go though web.config a set this project correctly.

I don't think you should move DB do App_Data and run KiGG with attached DB. I think it works bets with full MS SQL (or Express) but I will leave that for you to decide.

Regards,
Pawel
http://dotnetomaniak.pl

Thank you for the answer...I will try the above mentioned solution and will post back the results here.

Sep 12, 2011 at 5:51 PM
Edited Sep 12, 2011 at 7:24 PM
pawlos wrote:The solution is here: http://kigg.codeplex.com/discussions/210582. Have you tried this?

The second one is because you haven't correctly configured connection string for Unity. Open your web.config and search for <type type="IConnectionString" mapTo="ConnectionString">

You will see a comment there to put your connection string name. Something like <!--Database Connection String Name -->. Put there KiGGDatabase. So it should be as:

<param name="name" parameterType="System.String">
    <value type="System.String" value="KiGGDatabase"/>
    <!--Database Connection String Name -->
</param>

But if you haven't change it then you probably haven't configured other stuff. Go though web.config a set this project correctly.

I don't think you should move DB do App_Data and run KiGG with attached DB. I think it works bets with full MS SQL (or Express) but I will leave that for you to decide.

Regards,
Pawel
http://dotnetomaniak.pl

FYI: Yes, the latest version of MVC 3 is installed on my machine.

Ok I tried the solution but still not able to run KIGG project on my local machine (in VS)

According to the solution provided above, this was my original file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>
          </StartPageUrl>
          <StartAction>CurrentPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <SilverlightDebugging>False</SilverlightDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
          <StartCmdLineArguments>
          </StartCmdLineArguments>
          <StartWorkingDirectory>
          </StartWorkingDirectory>
          <EnableENC>False</EnableENC>
          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>2429</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

 

I changed it to this:

 

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>
          </StartPageUrl>
          <StartAction>CurrentPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <SilverlightDebugging>False</SilverlightDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
          <StartCmdLineArguments>
          </StartCmdLineArguments>
          <StartWorkingDirectory>
          </StartWorkingDirectory>
          <EnableENC>False</EnableENC>
          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>2429</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>


<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">   

<AspNetCompiler VirtualPath="temp" ToolPath="C:\Windows\Microsoft.NET\Framework\v2.0.50727" PhysicalPath="$(ProjectDir)\..\Web" /> 

</Target>

          </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

 

and in my webconfig, my original code:

<param name="name" parameterType="System.String">
                  <value type="System.String" value="KiGGDatabase"/>
                  <!--Database Connection String Name -->

</param>

 

I changed it to this:

 

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

                </param>

 

 

still getting same 3 errors plus this on my webpage when I run with errors:

Line 82: </backingStores> Line 83: </cachingConfiguration> Line 84: <unity> Line 85: <typeAliases> Line 86: <typeAlias alias="Singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity"/>

 

PLEASE HELP ME

Sep 13, 2011 at 7:12 AM

No no no :)

Remove line <add name> from last fragment you've showed above. There should be only <valu type="System.String" value="KiGGDatabase" />.
Then try compiling and provide us with error messages if there are still some.

Regards,
Pawel

Sep 13, 2011 at 1:59 PM
Edited Sep 14, 2011 at 4:42 PM
pawlos wrote:

No no no :)

Remove line <add name> from last fragment you've showed above. There should be only <valu type="System.String" value="KiGGDatabase" />.
Then try compiling and provide us with error messages if there are still some.

Regards,
Pawel

My above code in Kigg.Web.csproj is fine ?

Ok I removed that line and this is what I am getting now 3 ERRORS: (same as above what I posted in very first post)

I don't understand why it is so hard to install Kigg.

 

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    21    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    27    Kigg.Web

Error    104    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