The type or namespace name 'IConfigurationSource' could not be found

134 views
Skip to first unread message

ksen

unread,
Dec 3, 2011, 11:08:58 PM12/3/11
to OpenRasta
I down loaded the src code from https://github.com/openrasta/openrasta-stable/downloads,
and did build using make.bat

Followed the instruction from the creating first site. Created a new
web project with 4.0 as target framework, i referenced the dll from
3.5 folder. Here is the error i get during the compilation.


Error 2 The type name 'IConfigurationSource' does not exist in the
type 'OpenRasta.Configuration' C:\src\VIE\Trunk\RelayHealth\prototypes
\Openrasta\OpenRasta\Configuration.cs 12 58 OpenRasta
, and did build using


Here is the code

namespace OpenRasta
{

public class Configuration :
OpenRasta.Configuration.IConfigurationSource
{
public void Configure()
{

OpenRasta.Configuration.ResourceSpace.Has.ResourcesOfType<Home>()
.AtUri("/home")
.HandledBy<HomeHandler>();

}
}
}


Did anyone get this and how to fix it.

Thanks
ksen

Sebastien Lambla

unread,
Dec 5, 2011, 8:42:33 AM12/5/11
to open...@googlegroups.com
nope, never heard of this before. Can you post example code (a gist or otherwise) maybe there's something that was missed.

Seb
________________________________________
From: open...@googlegroups.com [open...@googlegroups.com] on behalf of ksen [senthil.k...@gmail.com]
Sent: 04 December 2011 04:08
To: OpenRasta
Subject: [openrasta] The type or namespace name 'IConfigurationSource' could not be found

ksen

unread,
Dec 5, 2011, 3:07:09 PM12/5/11
to OpenRasta
Here is the code from the web.config

<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<modules>
<add name="OpenRastaModule"
type="OpenRasta.Hosting.AspNet.OpenRastaModule,
OpenRasta.Hosting.AspNet"/>
</modules>
<handlers>
<add name="OpenRastaHandler" verb="*" path="*.rastahook"
type="OpenRasta.Hosting.AspNet.OpenRastaHandler,
OpenRasta.Hosting.AspNet"/>
</handlers>
</system.webServer>

Here is the code in Configuration.cs
using OpenRasta.Handler;
using OpenRasta.Resources;
using OpenRasta;
namespace OpenRasta
{

public class Configuration : IConfigurationSource
{
public void Configure()
{


ResourceSpace.Has.ResourcesOfType<Home>()
.AtUri("/home")
.HandledBy<HomeHandler>();

}
}
}

I get the compiler error

Error 1 The type or namespace name 'IConfigurationSource' could not be
found (are you missing a using directive or an assembly reference?) C:


\src\VIE\Trunk\RelayHealth\prototypes\Openrasta\OpenRasta

\Configuration.cs 7 34 OpenRasta


I referenced these thre dlls from the 2.0 bin(id does not matter,
change it from 3.5. or 3.0)
OpenRasta.Codecs.WebForms.dll
OpenRasta.dll
OpenRasta.Hosting.AspNet.dll


Thanks for the response.

-ksen

On Dec 5, 5:42 am, Sebastien Lambla <s...@serialseb.com> wrote:
> nope, never heard of this before. Can you post example code (a gist or otherwise) maybe there's something that was missed.
>
> Seb
> ________________________________________

> From: open...@googlegroups.com [open...@googlegroups.com] on behalf of ksen [senthil.kumaras...@gmail.com]


> Sent: 04 December 2011 04:08
> To: OpenRasta
> Subject: [openrasta] The type or namespace name 'IConfigurationSource' could not be found
>

> I down loaded the src code fromhttps://github.com/openrasta/openrasta-stable/downloads,

ksen

unread,
Dec 5, 2011, 3:09:37 PM12/5/11
to OpenRasta
I added using OpenRasta.Configuration; still the same issue

> > ksen- Hide quoted text -
>
> - Show quoted text -

Sebastien Lambla

unread,
Dec 5, 2011, 3:08:12 PM12/5/11
to open...@googlegroups.com
your Confiugraiton.cs is missing the using OpenRasta.Configuration line.

If you use ReSharper it'd have told you, if you use visual studio you would have a small underlining under the type, opening the auto suggest (CTRL+. with default bindings) would offer to import the namespace.

You want to use the 3.5 DLLs otherwise any linq in OR will be incompatible with the linq in .net.


________________________________________
From: open...@googlegroups.com [open...@googlegroups.com] on behalf of ksen [senthil.k...@gmail.com]
Sent: 05 December 2011 20:07
To: OpenRasta
Subject: [openrasta] Re: The type or namespace name 'IConfigurationSource' could not be found

ksen

unread,
Dec 5, 2011, 3:14:04 PM12/5/11
to OpenRasta
I found the issue, Sorry, it is my mistake, i created my test project
also with same name(namespace), that is why it could not find it.

On Dec 5, 12:07 pm, ksen <senthil.kumaras...@gmail.com> wrote:

ksen

unread,
Dec 5, 2011, 4:29:03 PM12/5/11
to OpenRasta
Hi Sebastien,

Thanks for your response, Now i have another issue , I followed the
instruction to create a first site using openRasta,
https://github.com/openrasta/openrasta-stable/wiki/Building-Your-First-OpenRasta-Website


This test app is hosted in IIS7, when iam browsing(http://
127.0.0.1:8080/home) i get this error

Server Error in '/' Application.
Value cannot be null.
Parameter name: collection
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.ArgumentNullException: Value cannot be null.
Parameter name: collection

Source Error:

Line 12: public PipelineStage(IPipeline pipeline)
Line 13: {
Line 14: _enumerator = new
ResumableIterator<ContributorCall, Type>(
Line 15: new
List<ContributorCall>(pipeline.CallGraph).GetEnumerator(),
Line 16: x => x.Target != null ? x.Target.GetType() :
null,


Source File: c:\src\openrasta\src\core\OpenRasta\Pipeline
\PipelineStage.cs Line: 14

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: collection]
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
+601
OpenRasta.Pipeline.PipelineStage..ctor(IPipeline pipeline) in c:\src
\openrasta\src\core\OpenRasta\Pipeline\PipelineStage.cs:14

OpenRasta.Hosting.AspNet.OpenRastaModule.HandleHttpApplicationPostResolveRequestCacheEvent(Object
sender, EventArgs e) in c:\src\openrasta\src\aspnet
\OpenRasta.Hosting.AspNet\OpenRastaModule.cs:143

System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+182
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +266


Thanks
Senthil

> > - Show quoted text -- Hide quoted text -

Reply all
Reply to author
Forward
0 new messages